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

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

Issue 2493053002: [extensions] Stop parsing webstore urls so much (Closed)
Patch Set: rdevlin review Created 4 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
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 "base/macros.h" 9 #include "base/macros.h"
10 #include "extensions/common/api/generated_schemas.h" 10 #include "extensions/common/api/generated_schemas.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(ShellPermissionMessageProvider); 70 DISALLOW_COPY_AND_ASSIGN(ShellPermissionMessageProvider);
71 }; 71 };
72 72
73 base::LazyInstance<ShellPermissionMessageProvider> 73 base::LazyInstance<ShellPermissionMessageProvider>
74 g_permission_message_provider = LAZY_INSTANCE_INITIALIZER; 74 g_permission_message_provider = LAZY_INSTANCE_INITIALIZER;
75 75
76 } // namespace 76 } // namespace
77 77
78 ShellExtensionsClient::ShellExtensionsClient() 78 ShellExtensionsClient::ShellExtensionsClient()
79 : extensions_api_permissions_(ExtensionsAPIPermissions()) { 79 : extensions_api_permissions_(ExtensionsAPIPermissions()),
80 } 80 webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) {}
81 81
82 ShellExtensionsClient::~ShellExtensionsClient() { 82 ShellExtensionsClient::~ShellExtensionsClient() {
83 } 83 }
84 84
85 void ShellExtensionsClient::Initialize() { 85 void ShellExtensionsClient::Initialize() {
86 RegisterCommonManifestHandlers(); 86 RegisterCommonManifestHandlers();
87 ManifestHandler::FinalizeRegistration(); 87 ManifestHandler::FinalizeRegistration();
88 // TODO(jamescook): Do we need to whitelist any extensions? 88 // TODO(jamescook): Do we need to whitelist any extensions?
89 89
90 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_, 90 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return true; 178 return true;
179 } 179 }
180 180
181 void ShellExtensionsClient::RecordDidSuppressFatalError() { 181 void ShellExtensionsClient::RecordDidSuppressFatalError() {
182 } 182 }
183 183
184 std::string ShellExtensionsClient::GetWebstoreBaseURL() const { 184 std::string ShellExtensionsClient::GetWebstoreBaseURL() const {
185 return extension_urls::kChromeWebstoreBaseURL; 185 return extension_urls::kChromeWebstoreBaseURL;
186 } 186 }
187 187
188 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { 188 const GURL& ShellExtensionsClient::GetWebstoreUpdateURL() const {
189 return extension_urls::kChromeWebstoreUpdateURL; 189 return webstore_update_url_;
190 } 190 }
191 191
192 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { 192 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
193 // TODO(rockot): Maybe we want to do something else here. For now we accept 193 // TODO(rockot): Maybe we want to do something else here. For now we accept
194 // any URL as a blacklist URL because we don't really care. 194 // any URL as a blacklist URL because we don't really care.
195 return true; 195 return true;
196 } 196 }
197 197
198 } // namespace extensions 198 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/common/shell_extensions_client.h ('k') | extensions/test/test_extensions_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698