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

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

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 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 | Annotate | Revision Log
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 "chrome/browser/extensions/extension_special_storage_policy.h" 11 #include "chrome/browser/extensions/extension_special_storage_policy.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 // This class is the same as MockSpecialStoragePolicy (in 14 // This class is the same as MockSpecialStoragePolicy (in
15 // content/public/test/mock_special_storage_policy.h), but it inherits 15 // content/public/test/mock_special_storage_policy.h), but it inherits
16 // ExtensionSpecialStoragePolicy instead of quota::SpecialStoragePolicy. 16 // ExtensionSpecialStoragePolicy instead of storage::SpecialStoragePolicy.
17 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy { 17 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy {
18 public: 18 public:
19 MockExtensionSpecialStoragePolicy(); 19 MockExtensionSpecialStoragePolicy();
20 20
21 // quota::SpecialStoragePolicy: 21 // storage::SpecialStoragePolicy:
22 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE; 22 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE;
23 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE; 23 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE;
24 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE; 24 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE;
25 virtual bool CanQueryDiskSize(const GURL& origin) OVERRIDE; 25 virtual bool CanQueryDiskSize(const GURL& origin) OVERRIDE;
26 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE; 26 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE;
27 virtual bool HasSessionOnlyOrigins() OVERRIDE; 27 virtual bool HasSessionOnlyOrigins() OVERRIDE;
28 28
29 void AddProtected(const GURL& origin) { 29 void AddProtected(const GURL& origin) {
30 protected_.insert(origin); 30 protected_.insert(origin);
31 } 31 }
32 32
33 private: 33 private:
34 virtual ~MockExtensionSpecialStoragePolicy(); 34 virtual ~MockExtensionSpecialStoragePolicy();
35 35
36 std::set<GURL> protected_; 36 std::set<GURL> protected_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy); 38 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
39 }; 39 };
40 40
41 #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