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

Side by Side Diff: extensions/shell/common/shell_extensions_client.cc

Issue 586873003: extensions: Move sockets manifest handler registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "extensions/shell/common/shell_extensions_client.h" 5 #include "extensions/shell/common/shell_extensions_client.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "extensions/common/api/generated_schemas.h" 9 #include "extensions/common/api/generated_schemas.h"
10 #include "extensions/common/api/sockets/sockets_manifest_handler.h"
11 #include "extensions/common/common_manifest_handlers.h" 10 #include "extensions/common/common_manifest_handlers.h"
12 #include "extensions/common/extension_urls.h" 11 #include "extensions/common/extension_urls.h"
13 #include "extensions/common/features/api_feature.h" 12 #include "extensions/common/features/api_feature.h"
14 #include "extensions/common/features/base_feature_provider.h" 13 #include "extensions/common/features/base_feature_provider.h"
15 #include "extensions/common/features/json_feature_provider_source.h" 14 #include "extensions/common/features/json_feature_provider_source.h"
16 #include "extensions/common/features/manifest_feature.h" 15 #include "extensions/common/features/manifest_feature.h"
17 #include "extensions/common/features/permission_feature.h" 16 #include "extensions/common/features/permission_feature.h"
18 #include "extensions/common/features/simple_feature.h" 17 #include "extensions/common/features/simple_feature.h"
19 #include "extensions/common/manifest_handler.h" 18 #include "extensions/common/manifest_handler.h"
20 #include "extensions/common/permissions/permission_message_provider.h" 19 #include "extensions/common/permissions/permission_message_provider.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 77
79 ShellExtensionsClient::ShellExtensionsClient() 78 ShellExtensionsClient::ShellExtensionsClient()
80 : extensions_api_permissions_(ExtensionsAPIPermissions()) { 79 : extensions_api_permissions_(ExtensionsAPIPermissions()) {
81 } 80 }
82 81
83 ShellExtensionsClient::~ShellExtensionsClient() { 82 ShellExtensionsClient::~ShellExtensionsClient() {
84 } 83 }
85 84
86 void ShellExtensionsClient::Initialize() { 85 void ShellExtensionsClient::Initialize() {
87 RegisterCommonManifestHandlers(); 86 RegisterCommonManifestHandlers();
88
89 // TODO(rockot): API manifest handlers which move out to src/extensions
90 // should either end up in RegisterCommonManifestHandlers or some new
91 // initialization step specifically for API manifest handlers.
92 (new SocketsManifestHandler)->Register();
93
94 ManifestHandler::FinalizeRegistration(); 87 ManifestHandler::FinalizeRegistration();
95 // TODO(jamescook): Do we need to whitelist any extensions? 88 // TODO(jamescook): Do we need to whitelist any extensions?
96 89
97 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_); 90 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_);
98 } 91 }
99 92
100 const PermissionMessageProvider& 93 const PermissionMessageProvider&
101 ShellExtensionsClient::GetPermissionMessageProvider() const { 94 ShellExtensionsClient::GetPermissionMessageProvider() const {
102 NOTIMPLEMENTED(); 95 NOTIMPLEMENTED();
103 return g_permission_message_provider.Get(); 96 return g_permission_message_provider.Get();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return extension_urls::kChromeWebstoreUpdateURL; 195 return extension_urls::kChromeWebstoreUpdateURL;
203 } 196 }
204 197
205 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { 198 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
206 // TODO(rockot): Maybe we want to do something else here. For now we accept 199 // TODO(rockot): Maybe we want to do something else here. For now we accept
207 // any URL as a blacklist URL because we don't really care. 200 // any URL as a blacklist URL because we don't really care.
208 return true; 201 return true;
209 } 202 }
210 203
211 } // namespace extensions 204 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698