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

Side by Side Diff: chrome/common/extensions/chrome_extensions_client.h

Issue 2379763003: Extract permission alias info from PermissionsProvider (Closed)
Patch Set: not nesting Alias in AliasProvider Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "chrome/common/extensions/chrome_alias_provider.h"
13 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" 14 #include "chrome/common/extensions/permissions/chrome_api_permissions.h"
14 #include "chrome/common/extensions/permissions/chrome_permission_message_provide r.h" 15 #include "chrome/common/extensions/permissions/chrome_permission_message_provide r.h"
16 #include "extensions/common/extensions_alias_provider.h"
15 #include "extensions/common/extensions_client.h" 17 #include "extensions/common/extensions_client.h"
16 #include "extensions/common/permissions/extensions_api_permissions.h" 18 #include "extensions/common/permissions/extensions_api_permissions.h"
17 19
18 namespace extensions { 20 namespace extensions {
19 21
20 // The implementation of ExtensionsClient for Chrome, which encapsulates the 22 // The implementation of ExtensionsClient for Chrome, which encapsulates the
21 // global knowledge of features, permissions, and manifest fields. 23 // global knowledge of features, permissions, and manifest fields.
22 class ChromeExtensionsClient : public ExtensionsClient { 24 class ChromeExtensionsClient : public ExtensionsClient {
23 public: 25 public:
24 ChromeExtensionsClient(); 26 ChromeExtensionsClient();
(...skipping 25 matching lines...) Expand all
50 std::string GetWebstoreUpdateURL() const override; 52 std::string GetWebstoreUpdateURL() const override;
51 bool IsBlacklistUpdateURL(const GURL& url) const override; 53 bool IsBlacklistUpdateURL(const GURL& url) const override;
52 std::set<base::FilePath> GetBrowserImagePaths( 54 std::set<base::FilePath> GetBrowserImagePaths(
53 const Extension* extension) override; 55 const Extension* extension) override;
54 bool ExtensionAPIEnabledInExtensionServiceWorkers() const override; 56 bool ExtensionAPIEnabledInExtensionServiceWorkers() const override;
55 57
56 // Get the LazyInstance for ChromeExtensionsClient. 58 // Get the LazyInstance for ChromeExtensionsClient.
57 static ChromeExtensionsClient* GetInstance(); 59 static ChromeExtensionsClient* GetInstance();
58 60
59 private: 61 private:
62 const ChromeAliasProvider chrome_alias_provider_;
63 const ExtensionsAliasProvider extensions_alias_provider_;
64
60 const ChromeAPIPermissions chrome_api_permissions_; 65 const ChromeAPIPermissions chrome_api_permissions_;
61 const ExtensionsAPIPermissions extensions_api_permissions_; 66 const ExtensionsAPIPermissions extensions_api_permissions_;
62 const ChromePermissionMessageProvider permission_message_provider_; 67 const ChromePermissionMessageProvider permission_message_provider_;
63 68
64 // A whitelist of extensions that can script anywhere. Do not add to this 69 // A whitelist of extensions that can script anywhere. Do not add to this
65 // list (except in tests) without consulting the Extensions team first. 70 // list (except in tests) without consulting the Extensions team first.
66 // Note: Component extensions have this right implicitly and do not need to be 71 // Note: Component extensions have this right implicitly and do not need to be
67 // added to this list. 72 // added to this list.
68 ScriptingWhitelist scripting_whitelist_; 73 ScriptingWhitelist scripting_whitelist_;
69 74
70 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; 75 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>;
71 76
72 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); 77 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient);
73 }; 78 };
74 79
75 } // namespace extensions 80 } // namespace extensions
76 81
77 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ 82 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698