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

Side by Side Diff: chrome/browser/browsing_data/mock_browsing_data_indexed_db_helper.cc

Issue 124183002: Implement delete methods for the various CannedBrowsingDataHelpers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browsing_data/mock_browsing_data_indexed_db_helper.h" 5 #include "chrome/browser/browsing_data/mock_browsing_data_indexed_db_helper.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/browser_context.h"
11 #include "content/public/browser/storage_partition.h"
9 12
10 MockBrowsingDataIndexedDBHelper::MockBrowsingDataIndexedDBHelper() { 13 MockBrowsingDataIndexedDBHelper::MockBrowsingDataIndexedDBHelper(
14 Profile* profile)
15 : BrowsingDataIndexedDBHelper(
16 content::BrowserContext::GetDefaultStoragePartition(profile)->
17 GetIndexedDBContext()) {
11 } 18 }
12 19
13 MockBrowsingDataIndexedDBHelper::~MockBrowsingDataIndexedDBHelper() { 20 MockBrowsingDataIndexedDBHelper::~MockBrowsingDataIndexedDBHelper() {
14 } 21 }
15 22
16 void MockBrowsingDataIndexedDBHelper::StartFetching( 23 void MockBrowsingDataIndexedDBHelper::StartFetching(
17 const base::Callback<void(const std::list<content::IndexedDBInfo>&)>& 24 const base::Callback<void(const std::list<content::IndexedDBInfo>&)>&
18 callback) { 25 callback) {
19 callback_ = callback; 26 callback_ = callback;
20 } 27 }
(...skipping 26 matching lines...) Expand all
47 i->second = true; 54 i->second = true;
48 } 55 }
49 56
50 bool MockBrowsingDataIndexedDBHelper::AllDeleted() { 57 bool MockBrowsingDataIndexedDBHelper::AllDeleted() {
51 for (std::map<GURL, bool>::const_iterator i = origins_.begin(); 58 for (std::map<GURL, bool>::const_iterator i = origins_.begin();
52 i != origins_.end(); ++i) 59 i != origins_.end(); ++i)
53 if (i->second) 60 if (i->second)
54 return false; 61 return false;
55 return true; 62 return true;
56 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698