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

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

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 10 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 #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;
27 bool HasSessionOnlyOrigins() override; 26 bool HasSessionOnlyOrigins() override;
28 27
29 void AddProtected(const GURL& origin) { 28 void AddProtected(const GURL& origin) {
30 protected_.insert(origin); 29 protected_.insert(origin);
31 } 30 }
32 31
33 private: 32 private:
34 ~MockExtensionSpecialStoragePolicy() override; 33 ~MockExtensionSpecialStoragePolicy() override;
35 34
36 std::set<GURL> protected_; 35 std::set<GURL> protected_;
37 36
38 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy); 37 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
39 }; 38 };
40 39
41 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 40 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698