[Native File System] Constantize and CamelCase Quarantine Check Accessors
Bug: 986588
Change-Id: I6d4cd8531a7bd6fc366e29a6b8ab415b35c41a8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783077
Commit-Queue: Olivier Yiptong <oyiptong@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Auto-Submit: Olivier Yiptong <oyiptong@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692792}
diff --git a/content/browser/native_file_system/native_file_system_file_writer_impl.cc b/content/browser/native_file_system/native_file_system_file_writer_impl.cc
index b1b65fb..b34bec4 100644
--- a/content/browser/native_file_system/native_file_system_file_writer_impl.cc
+++ b/content/browser/native_file_system/native_file_system_file_writer_impl.cc
@@ -308,7 +308,7 @@
return;
}
- if (can_skip_quarantine_check()) {
+ if (CanSkipQuarantineCheck()) {
state_ = State::kClosed;
std::move(callback).Run(native_file_system_error::Ok());
return;
diff --git a/content/browser/native_file_system/native_file_system_file_writer_impl.h b/content/browser/native_file_system/native_file_system_file_writer_impl.h
index 079a188..025e61b 100644
--- a/content/browser/native_file_system/native_file_system_file_writer_impl.h
+++ b/content/browser/native_file_system/native_file_system_file_writer_impl.h
@@ -57,8 +57,8 @@
void Truncate(uint64_t length, TruncateCallback callback) override;
void Close(CloseCallback callback) override;
- void set_skip_quarantine_service_for_testing() {
- skip_quarantine_service_for_testing_ = true;
+ void SetSkipQuarantineCheckForTesting() {
+ skip_quarantine_check_for_testing_ = true;
}
using HashCallback = base::OnceCallback<void(base::File::Error error,
@@ -95,8 +95,8 @@
quarantine::mojom::QuarantineFileResult result);
// Quarantine checks only apply to native local paths.
- bool can_skip_quarantine_check() {
- return skip_quarantine_service_for_testing_ ||
+ bool CanSkipQuarantineCheck() const {
+ return skip_quarantine_check_for_testing_ ||
url().type() != storage::kFileSystemTypeNativeLocal;
}
@@ -130,7 +130,7 @@
storage::FileSystemURL swap_url_;
State state_ = State::kOpen;
- bool skip_quarantine_service_for_testing_ = false;
+ bool skip_quarantine_check_for_testing_ = false;
// Keeps track of user activation state at creation time for SafeBrowsing
// checks.
diff --git a/content/browser/native_file_system/native_file_system_file_writer_impl_unittest.cc b/content/browser/native_file_system/native_file_system_file_writer_impl_unittest.cc
index 12d0f94..8db8f7f 100644
--- a/content/browser/native_file_system/native_file_system_file_writer_impl_unittest.cc
+++ b/content/browser/native_file_system/native_file_system_file_writer_impl_unittest.cc
@@ -95,7 +95,7 @@
NativeFileSystemManagerImpl::SharedHandleState(
permission_grant_, permission_grant_, std::move(fs)),
/*has_transient_user_activation=*/false);
- handle_->set_skip_quarantine_service_for_testing();
+ handle_->SetSkipQuarantineCheckForTesting();
}
void TearDown() override {