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

Side by Side Diff: content/public/test/mock_special_storage_policy.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « content/public/test/download_test_observer.cc ('k') | content/public/test/test_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/public/test/mock_special_storage_policy.h" 5 #include "content/public/test/mock_special_storage_policy.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 MockSpecialStoragePolicy::MockSpecialStoragePolicy() 11 MockSpecialStoragePolicy::MockSpecialStoragePolicy()
12 : all_unlimited_(false) { 12 : all_unlimited_(false) {
13 } 13 }
14 14
15 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { 15 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
16 return ContainsKey(protected_, origin); 16 return base::ContainsKey(protected_, origin);
17 } 17 }
18 18
19 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { 19 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
20 if (all_unlimited_) 20 if (all_unlimited_)
21 return true; 21 return true;
22 return ContainsKey(unlimited_, origin); 22 return base::ContainsKey(unlimited_, origin);
23 } 23 }
24 24
25 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { 25 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
26 return ContainsKey(session_only_, origin); 26 return base::ContainsKey(session_only_, origin);
27 } 27 }
28 28
29 bool MockSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { 29 bool MockSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) {
30 return ContainsKey(can_query_disk_size_, origin); 30 return base::ContainsKey(can_query_disk_size_, origin);
31 } 31 }
32 32
33 bool MockSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { 33 bool MockSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
34 return ContainsKey(isolated_, origin); 34 return base::ContainsKey(isolated_, origin);
35 } 35 }
36 36
37 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() { 37 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() {
38 return !session_only_.empty(); 38 return !session_only_.empty();
39 } 39 }
40 40
41 bool MockSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { 41 bool MockSpecialStoragePolicy::IsStorageDurable(const GURL& origin) {
42 return ContainsKey(durable_, origin); 42 return base::ContainsKey(durable_, origin);
43 } 43 }
44 44
45 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} 45 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {}
46 46
47 } // namespace content 47 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/download_test_observer.cc ('k') | content/public/test/test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698