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

Side by Side Diff: chrome/browser/extensions/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_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 11
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "webkit/quota/special_storage_policy.h" 14 #include "webkit/quota/special_storage_policy.h"
15 15
16 class CookieSettings; 16 class CookieSettings;
17 class Extension; 17 class Extension;
18 18
19 // Special rights are granted to 'extensions' and 'applications'. The 19 // Special rights are granted to 'extensions' and 'applications'. The
20 // storage subsystems and the browsing data remover query this interface 20 // storage subsystems and the browsing data remover query this interface
21 // to determine which origins have these rights. 21 // to determine which origins have these rights.
22 class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy { 22 class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy {
23 public: 23 public:
24 explicit ExtensionSpecialStoragePolicy(CookieSettings* cookie_settings); 24 explicit ExtensionSpecialStoragePolicy(CookieSettings* cookie_settings);
25 25
26 // SpecialStoragePolicy methods used by storage subsystems and the browsing 26 // SpecialStoragePolicy methods used by storage subsystems and the browsing
27 // data remover. These methods are safe to call on any thread. 27 // data remover. These methods are safe to call on any thread.
28 virtual bool IsStorageProtected(const GURL& origin); 28 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE;
29 virtual bool IsStorageUnlimited(const GURL& origin); 29 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE;
30 virtual bool IsStorageSessionOnly(const GURL& origin); 30 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE;
31 virtual bool IsFileHandler(const std::string& extension_id); 31 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE;
32 virtual bool HasSessionOnlyOrigins(); 32 virtual bool HasSessionOnlyOrigins() OVERRIDE;
33 33
34 // Methods used by the ExtensionService to populate this class. 34 // Methods used by the ExtensionService to populate this class.
35 void GrantRightsForExtension(const Extension* extension); 35 void GrantRightsForExtension(const Extension* extension);
36 void RevokeRightsForExtension(const Extension* extension); 36 void RevokeRightsForExtension(const Extension* extension);
37 void RevokeRightsForAllExtensions(); 37 void RevokeRightsForAllExtensions();
38 38
39 protected: 39 protected:
40 virtual ~ExtensionSpecialStoragePolicy(); 40 virtual ~ExtensionSpecialStoragePolicy();
41 41
42 private: 42 private:
(...skipping 18 matching lines...) Expand all
61 void NotifyChanged(); 61 void NotifyChanged();
62 62
63 base::Lock lock_; // Synchronize all access to the collections. 63 base::Lock lock_; // Synchronize all access to the collections.
64 SpecialCollection protected_apps_; 64 SpecialCollection protected_apps_;
65 SpecialCollection unlimited_extensions_; 65 SpecialCollection unlimited_extensions_;
66 SpecialCollection file_handler_extensions_; 66 SpecialCollection file_handler_extensions_;
67 scoped_refptr<CookieSettings> cookie_settings_; 67 scoped_refptr<CookieSettings> cookie_settings_;
68 }; 68 };
69 69
70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_sidebar_api.h ('k') | chrome/browser/extensions/extension_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698