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

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

Issue 8473003: Add OVERRIDE to chrome/browser/extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "chrome/browser/extensions/extension_special_storage_policy.h" 12 #include "chrome/browser/extensions/extension_special_storage_policy.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 14
15 // This class is the same as MockSpecialStoragePolicy (in 15 // This class is the same as MockSpecialStoragePolicy (in
16 // webkit/quota/mock_special_storage_policy.h), but it inherits 16 // webkit/quota/mock_special_storage_policy.h), but it inherits
17 // ExtensionSpecialStoragePolicy instead of quota::SpecialStoragePolicy. 17 // ExtensionSpecialStoragePolicy instead of quota::SpecialStoragePolicy.
18 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy { 18 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy {
19 public: 19 public:
20 MockExtensionSpecialStoragePolicy(); 20 MockExtensionSpecialStoragePolicy();
21 virtual ~MockExtensionSpecialStoragePolicy(); 21 virtual ~MockExtensionSpecialStoragePolicy();
22 22
23 virtual bool IsStorageProtected(const GURL& origin); 23 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE;
24 virtual bool IsStorageUnlimited(const GURL& origin); 24 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE;
25 virtual bool IsStorageSessionOnly(const GURL& origin); 25 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE;
26 virtual bool IsFileHandler(const std::string& extension_id); 26 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE;
27 virtual bool HasSessionOnlyOrigins(); 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 void AddUnlimited(const GURL& origin) { 33 void AddUnlimited(const GURL& origin) {
34 unlimited_.insert(origin); 34 unlimited_.insert(origin);
35 } 35 }
36 36
37 void AddSessionOnly(const GURL& origin) { 37 void AddSessionOnly(const GURL& origin) {
(...skipping 14 matching lines...) Expand all
52 private: 52 private:
53 std::set<GURL> protected_; 53 std::set<GURL> protected_;
54 std::set<GURL> unlimited_; 54 std::set<GURL> unlimited_;
55 std::set<GURL> session_only_; 55 std::set<GURL> session_only_;
56 std::set<std::string> file_handlers_; 56 std::set<std::string> file_handlers_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy); 58 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
59 }; 59 };
60 60
61 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 61 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_extension_provider_impl.h ('k') | chrome/browser/extensions/sandboxed_extension_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698