Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Unified Diff: chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc

Issue 459233002: Browsing Data Deletion: Style fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-apply comment tweaks Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
diff --git a/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
index 26d81852253721a7bde2167a3a4f018d39e716da..759ad0562e515751614d6d5ffbef085c13a4c793 100644
--- a/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/browsing_data/mock_browsing_data_file_system_helper.h"
+
#include "base/callback.h"
#include "base/logging.h"
-#include "chrome/browser/browsing_data/mock_browsing_data_file_system_helper.h"
+#include "testing/gtest/include/gtest/gtest.h"
MockBrowsingDataFileSystemHelper::MockBrowsingDataFileSystemHelper(
Profile* profile) {
@@ -15,13 +17,16 @@ MockBrowsingDataFileSystemHelper::~MockBrowsingDataFileSystemHelper() {
void MockBrowsingDataFileSystemHelper::StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) {
+ ASSERT_FALSE(callback.is_null());
+ ASSERT_TRUE(callback_.is_null());
callback_ = callback;
}
void MockBrowsingDataFileSystemHelper::DeleteFileSystemOrigin(
const GURL& origin) {
+ ASSERT_FALSE(callback_.is_null());
std::string key = origin.spec();
- CHECK(file_systems_.find(key) != file_systems_.end());
+ ASSERT_TRUE(file_systems_.find(key) != file_systems_.end());
last_deleted_origin_ = origin;
file_systems_[key] = false;
}
@@ -47,7 +52,6 @@ void MockBrowsingDataFileSystemHelper::AddFileSystemSamples() {
}
void MockBrowsingDataFileSystemHelper::Notify() {
- CHECK_EQ(false, callback_.is_null());
callback_.Run(response_);
}

Powered by Google App Engine
This is Rietveld 408576698