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

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

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 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 unified diff | Download patch
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 "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 14 matching lines...) Expand all
25 void MockBrowsingDataIndexedDBHelper::StartFetching( 25 void MockBrowsingDataIndexedDBHelper::StartFetching(
26 const FetchCallback& callback) { 26 const FetchCallback& callback) {
27 ASSERT_FALSE(callback.is_null()); 27 ASSERT_FALSE(callback.is_null());
28 ASSERT_TRUE(callback_.is_null()); 28 ASSERT_TRUE(callback_.is_null());
29 callback_ = callback; 29 callback_ = callback;
30 } 30 }
31 31
32 void MockBrowsingDataIndexedDBHelper::DeleteIndexedDB( 32 void MockBrowsingDataIndexedDBHelper::DeleteIndexedDB(
33 const GURL& origin) { 33 const GURL& origin) {
34 ASSERT_FALSE(callback_.is_null()); 34 ASSERT_FALSE(callback_.is_null());
35 ASSERT_TRUE(ContainsKey(origins_, origin)); 35 ASSERT_TRUE(base::ContainsKey(origins_, origin));
36 origins_[origin] = false; 36 origins_[origin] = false;
37 } 37 }
38 38
39 void MockBrowsingDataIndexedDBHelper::AddIndexedDBSamples() { 39 void MockBrowsingDataIndexedDBHelper::AddIndexedDBSamples() {
40 const GURL kOrigin1("http://idbhost1:1/"); 40 const GURL kOrigin1("http://idbhost1:1/");
41 const GURL kOrigin2("http://idbhost2:2/"); 41 const GURL kOrigin2("http://idbhost2:2/");
42 content::IndexedDBInfo info1(kOrigin1, 1, base::Time(), 0); 42 content::IndexedDBInfo info1(kOrigin1, 1, base::Time(), 0);
43 response_.push_back(info1); 43 response_.push_back(info1);
44 origins_[kOrigin1] = true; 44 origins_[kOrigin1] = true;
45 content::IndexedDBInfo info2(kOrigin2, 2, base::Time(), 0); 45 content::IndexedDBInfo info2(kOrigin2, 2, base::Time(), 0);
(...skipping 10 matching lines...) Expand all
56 pair.second = true; 56 pair.second = true;
57 } 57 }
58 58
59 bool MockBrowsingDataIndexedDBHelper::AllDeleted() { 59 bool MockBrowsingDataIndexedDBHelper::AllDeleted() {
60 for (const auto& pair : origins_) { 60 for (const auto& pair : origins_) {
61 if (pair.second) 61 if (pair.second)
62 return false; 62 return false;
63 } 63 }
64 return true; 64 return true;
65 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698