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

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

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/mock_resource_context.h ('k') | content/public/test/mock_storage_client.h » ('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 #ifndef CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
6 #define CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 6 #define CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "storage/browser/quota/special_storage_policy.h" 11 #include "storage/browser/quota/special_storage_policy.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 using storage::SpecialStoragePolicy; 14 using storage::SpecialStoragePolicy;
15 15
16 namespace content { 16 namespace content {
17 17
18 class MockSpecialStoragePolicy : public storage::SpecialStoragePolicy { 18 class MockSpecialStoragePolicy : public storage::SpecialStoragePolicy {
19 public: 19 public:
20 MockSpecialStoragePolicy(); 20 MockSpecialStoragePolicy();
21 21
22 virtual bool IsStorageProtected(const GURL& origin) override; 22 bool IsStorageProtected(const GURL& origin) override;
23 virtual bool IsStorageUnlimited(const GURL& origin) override; 23 bool IsStorageUnlimited(const GURL& origin) override;
24 virtual bool IsStorageSessionOnly(const GURL& origin) override; 24 bool IsStorageSessionOnly(const GURL& origin) override;
25 virtual bool CanQueryDiskSize(const GURL& origin) override; 25 bool CanQueryDiskSize(const GURL& origin) override;
26 virtual bool IsFileHandler(const std::string& extension_id) override; 26 bool IsFileHandler(const std::string& extension_id) override;
27 virtual bool HasIsolatedStorage(const GURL& origin) override; 27 bool HasIsolatedStorage(const GURL& origin) override;
28 virtual bool HasSessionOnlyOrigins() override; 28 bool HasSessionOnlyOrigins() override;
29 29
30 void AddProtected(const GURL& origin) { 30 void AddProtected(const GURL& origin) {
31 protected_.insert(origin); 31 protected_.insert(origin);
32 } 32 }
33 33
34 void AddUnlimited(const GURL& origin) { 34 void AddUnlimited(const GURL& origin) {
35 unlimited_.insert(origin); 35 unlimited_.insert(origin);
36 } 36 }
37 37
38 void RemoveUnlimited(const GURL& origin) { 38 void RemoveUnlimited(const GURL& origin) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void NotifyRevoked(const GURL& origin, int change_flags) { 80 void NotifyRevoked(const GURL& origin, int change_flags) {
81 SpecialStoragePolicy::NotifyRevoked(origin, change_flags); 81 SpecialStoragePolicy::NotifyRevoked(origin, change_flags);
82 } 82 }
83 83
84 void NotifyCleared() { 84 void NotifyCleared() {
85 SpecialStoragePolicy::NotifyCleared(); 85 SpecialStoragePolicy::NotifyCleared();
86 } 86 }
87 87
88 protected: 88 protected:
89 virtual ~MockSpecialStoragePolicy(); 89 ~MockSpecialStoragePolicy() override;
90 90
91 private: 91 private:
92 std::set<GURL> protected_; 92 std::set<GURL> protected_;
93 std::set<GURL> unlimited_; 93 std::set<GURL> unlimited_;
94 std::set<GURL> session_only_; 94 std::set<GURL> session_only_;
95 std::set<GURL> can_query_disk_size_; 95 std::set<GURL> can_query_disk_size_;
96 std::set<GURL> isolated_; 96 std::set<GURL> isolated_;
97 std::set<std::string> file_handlers_; 97 std::set<std::string> file_handlers_;
98 98
99 bool all_unlimited_; 99 bool all_unlimited_;
100 }; 100 };
101 } // namespace content 101 } // namespace content
102 102
103 #endif // CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 103 #endif // CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « content/public/test/mock_resource_context.h ('k') | content/public/test/mock_storage_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698