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

Side by Side Diff: webkit/browser/quota/mock_special_storage_policy.cc

Issue 259083002: Move mock_special_storage_policy from webkit/ to content/public/test/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « webkit/browser/quota/mock_special_storage_policy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 "webkit/browser/quota/mock_special_storage_policy.h"
6
7 #include "base/stl_util.h"
8
9 namespace quota {
10
11 MockSpecialStoragePolicy::MockSpecialStoragePolicy()
12 : all_unlimited_(false) {
13 }
14
15 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
16 return ContainsKey(protected_, origin);
17 }
18
19 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
20 if (all_unlimited_)
21 return true;
22 return ContainsKey(unlimited_, origin);
23 }
24
25 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
26 return ContainsKey(session_only_, origin);
27 }
28
29 bool MockSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) {
30 return ContainsKey(can_query_disk_size_, origin);
31 }
32
33 bool MockSpecialStoragePolicy::IsFileHandler(const std::string& extension_id) {
34 return ContainsKey(file_handlers_, extension_id);
35 }
36
37 bool MockSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
38 return ContainsKey(isolated_, origin);
39 }
40
41 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() {
42 return !session_only_.empty();
43 }
44
45 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {}
46
47 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/mock_special_storage_policy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698