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

Side by Side Diff: chrome/browser/extensions/mock_extension_special_storage_policy.h

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years 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 #ifndef CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/extensions/extension_special_storage_policy.h" 12 #include "chrome/browser/extensions/extension_special_storage_policy.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 // This class is the same as MockSpecialStoragePolicy (in 15 // This class is the same as MockSpecialStoragePolicy (in
16 // content/public/test/mock_special_storage_policy.h), but it inherits 16 // content/public/test/mock_special_storage_policy.h), but it inherits
17 // ExtensionSpecialStoragePolicy instead of storage::SpecialStoragePolicy. 17 // ExtensionSpecialStoragePolicy instead of storage::SpecialStoragePolicy.
18 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy { 18 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy {
19 public: 19 public:
20 MockExtensionSpecialStoragePolicy(); 20 MockExtensionSpecialStoragePolicy();
21 21
22 // storage::SpecialStoragePolicy: 22 // storage::SpecialStoragePolicy:
23 bool IsStorageProtected(const GURL& origin) override; 23 bool IsStorageProtected(const GURL& origin) override;
24 bool IsStorageUnlimited(const GURL& origin) override; 24 bool IsStorageUnlimited(const GURL& origin) override;
25 bool IsStorageSessionOnly(const GURL& origin) override; 25 bool IsStorageSessionOnly(const GURL& origin) override;
26 bool CanQueryDiskSize(const GURL& origin) override;
26 bool HasSessionOnlyOrigins() override; 27 bool HasSessionOnlyOrigins() override;
27 28
28 void AddProtected(const GURL& origin) { 29 void AddProtected(const GURL& origin) {
29 protected_.insert(origin); 30 protected_.insert(origin);
30 } 31 }
31 32
32 private: 33 private:
33 ~MockExtensionSpecialStoragePolicy() override; 34 ~MockExtensionSpecialStoragePolicy() override;
34 35
35 std::set<GURL> protected_; 36 std::set<GURL> protected_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy); 38 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
38 }; 39 };
39 40
40 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 41 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698