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

Unified Diff: chrome/browser/mock_browsing_data_local_storage_helper.cc

Issue 523139: Adds local storage nodes to cookie tree model and cookies view. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 11 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/mock_browsing_data_local_storage_helper.cc
===================================================================
--- chrome/browser/mock_browsing_data_local_storage_helper.cc (revision 0)
+++ chrome/browser/mock_browsing_data_local_storage_helper.cc (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/mock_browsing_data_local_storage_helper.h"
+
+MockBrowsingDataLocalStorageHelper::MockBrowsingDataLocalStorageHelper(
+ Profile* profile)
+ : BrowsingDataLocalStorageHelper(profile),
+ profile_(profile),
+ callback_(NULL),
+ delete_all_files_called_(false) {
+}
+
+void MockBrowsingDataLocalStorageHelper::StartFetching(
+ Callback1<const std::vector<LocalStorageInfo>& >::Type* callback) {
+ callback_ = callback;
+}
+
+void MockBrowsingDataLocalStorageHelper::CancelNotification() {
+ callback_ = NULL;
+}
+
+void MockBrowsingDataLocalStorageHelper::DeleteLocalStorageFile(
+ const FilePath& file_path) {
+ last_deleted_file_ = file_path;
+}
+
+void MockBrowsingDataLocalStorageHelper::DeleteAllLocalStorageFiles() {
+ delete_all_files_called_ = true;
+}
+
+void MockBrowsingDataLocalStorageHelper::AddLocalStorageSamples() {
+ response_.push_back(
+ BrowsingDataLocalStorageHelper::LocalStorageInfo(
+ "http", "host1", 1, "db1", "origin1",
+ FilePath(FILE_PATH_LITERAL("file1")), 1, base::Time()));
+ response_.push_back(
+ BrowsingDataLocalStorageHelper::LocalStorageInfo(
+ "http", "host2", 2, "db2", "origin2",
+ FilePath(FILE_PATH_LITERAL("file2")), 2, base::Time()));
+}
+
+void MockBrowsingDataLocalStorageHelper::Notify() {
+ CHECK(callback_);
+ callback_->Run(response_);
+}
« no previous file with comments | « chrome/browser/mock_browsing_data_local_storage_helper.h ('k') | chrome/browser/views/options/cookies_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698