summaryrefslogtreecommitdiffstats
path: root/chrome/browser/mock_browsing_data_local_storage_helper.h
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 13:50:48 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 13:50:48 +0000
commit8f9aefdd9324680937c83b2137ecba8584322245 (patch)
tree7ace3e1ab52d41b24f8f268c8e29592253019ac9 /chrome/browser/mock_browsing_data_local_storage_helper.h
parent099fdcd5ff79ae6815f052060a605ad9a3454ad5 (diff)
downloadchromium_src-8f9aefdd9324680937c83b2137ecba8584322245.zip
chromium_src-8f9aefdd9324680937c83b2137ecba8584322245.tar.gz
chromium_src-8f9aefdd9324680937c83b2137ecba8584322245.tar.bz2
Adds local storage nodes to cookie tree model and cookies view.
BUG=none TEST=The show cookie dialog box should have a new node "local storage" when appropriate. When selected, it should display details of local storage (name, size on disk, last modified) in the details frame. Review URL: http://codereview.chromium.org/523139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/mock_browsing_data_local_storage_helper.h')
-rw-r--r--chrome/browser/mock_browsing_data_local_storage_helper.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/mock_browsing_data_local_storage_helper.h b/chrome/browser/mock_browsing_data_local_storage_helper.h
new file mode 100644
index 0000000..e60d772
--- /dev/null
+++ b/chrome/browser/mock_browsing_data_local_storage_helper.h
@@ -0,0 +1,37 @@
+// 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.
+
+#ifndef CHROME_BROWSER_MOCK_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_
+#define CHROME_BROWSER_MOCK_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_
+
+#include "chrome/browser/browsing_data_local_storage_helper.h"
+
+// Mock for BrowsingDataLocalStorageHelper.
+// Use AddLocalStorageSamples() or add directly to response_ vector, then
+// call Notify().
+class MockBrowsingDataLocalStorageHelper
+ : public BrowsingDataLocalStorageHelper {
+ public:
+ explicit MockBrowsingDataLocalStorageHelper(Profile* profile);
+
+ virtual void StartFetching(
+ Callback1<const std::vector<LocalStorageInfo>& >::Type* callback);
+ virtual void CancelNotification();
+ virtual void DeleteLocalStorageFile(const FilePath& file_path);
+ virtual void DeleteAllLocalStorageFiles();
+
+ // Adds some LocalStorageInfo samples.
+ void AddLocalStorageSamples();
+
+ // Notifies the callback.
+ void Notify();
+
+ Profile* profile_;
+ Callback1<const std::vector<LocalStorageInfo>& >::Type* callback_;
+ FilePath last_deleted_file_;
+ bool delete_all_files_called_;
+ std::vector<LocalStorageInfo> response_;
+};
+
+#endif // CHROME_BROWSER_MOCK_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_