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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/mock_browsing_data_local_storage_helper.h"
6
7 MockBrowsingDataLocalStorageHelper::MockBrowsingDataLocalStorageHelper(
8 Profile* profile)
9 : BrowsingDataLocalStorageHelper(profile),
10 profile_(profile),
11 callback_(NULL),
12 delete_all_files_called_(false) {
13 }
14
15 void MockBrowsingDataLocalStorageHelper::StartFetching(
16 Callback1<const std::vector<LocalStorageInfo>& >::Type* callback) {
17 callback_ = callback;
18 }
19
20 void MockBrowsingDataLocalStorageHelper::CancelNotification() {
21 callback_ = NULL;
22 }
23
24 void MockBrowsingDataLocalStorageHelper::DeleteLocalStorageFile(
25 const FilePath& file_path) {
26 last_deleted_file_ = file_path;
27 }
28
29 void MockBrowsingDataLocalStorageHelper::DeleteAllLocalStorageFiles() {
30 delete_all_files_called_ = true;
31 }
32
33 void MockBrowsingDataLocalStorageHelper::AddLocalStorageSamples() {
34 response_.push_back(
35 BrowsingDataLocalStorageHelper::LocalStorageInfo(
36 "http", "host1", 1, "db1", "origin1",
37 FilePath(FILE_PATH_LITERAL("file1")), 1, base::Time()));
38 response_.push_back(
39 BrowsingDataLocalStorageHelper::LocalStorageInfo(
40 "http", "host2", 2, "db2", "origin2",
41 FilePath(FILE_PATH_LITERAL("file2")), 2, base::Time()));
42 }
43
44 void MockBrowsingDataLocalStorageHelper::Notify() {
45 CHECK(callback_);
46 callback_->Run(response_);
47 }
OLDNEW
« 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