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

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

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
« no previous file with comments | « extensions/shell/common/api/schemas.gypi ('k') | extensions/test/test_extensions_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common_manifest_handlers.h" 10 #include "extensions/common/common_manifest_handlers.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 bool ShellExtensionsClient::IsScriptableURL(const GURL& url, 192 bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
193 std::string* error) const { 193 std::string* error) const {
194 NOTIMPLEMENTED(); 194 NOTIMPLEMENTED();
195 return true; 195 return true;
196 } 196 }
197 197
198 bool ShellExtensionsClient::IsAPISchemaGenerated( 198 bool ShellExtensionsClient::IsAPISchemaGenerated(
199 const std::string& name) const { 199 const std::string& name) const {
200 return core_api::GeneratedSchemas::IsGenerated(name) || 200 return api::GeneratedSchemas::IsGenerated(name) ||
201 shell::api::GeneratedSchemas::IsGenerated(name); 201 shell::api::ShellGeneratedSchemas::IsGenerated(name);
202 } 202 }
203 203
204 base::StringPiece ShellExtensionsClient::GetAPISchema( 204 base::StringPiece ShellExtensionsClient::GetAPISchema(
205 const std::string& name) const { 205 const std::string& name) const {
206 // Schema for app_shell-only APIs. 206 // Schema for app_shell-only APIs.
207 if (shell::api::GeneratedSchemas::IsGenerated(name)) 207 if (shell::api::ShellGeneratedSchemas::IsGenerated(name))
208 return shell::api::GeneratedSchemas::Get(name); 208 return shell::api::ShellGeneratedSchemas::Get(name);
209 209
210 // Core extensions APIs. 210 // Core extensions APIs.
211 return core_api::GeneratedSchemas::Get(name); 211 return api::GeneratedSchemas::Get(name);
212 } 212 }
213 213
214 void ShellExtensionsClient::RegisterAPISchemaResources( 214 void ShellExtensionsClient::RegisterAPISchemaResources(
215 ExtensionAPI* api) const { 215 ExtensionAPI* api) const {
216 } 216 }
217 217
218 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const { 218 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const {
219 return true; 219 return true;
220 } 220 }
221 221
222 void ShellExtensionsClient::RecordDidSuppressFatalError() { 222 void ShellExtensionsClient::RecordDidSuppressFatalError() {
223 } 223 }
224 224
225 std::string ShellExtensionsClient::GetWebstoreBaseURL() const { 225 std::string ShellExtensionsClient::GetWebstoreBaseURL() const {
226 return extension_urls::kChromeWebstoreBaseURL; 226 return extension_urls::kChromeWebstoreBaseURL;
227 } 227 }
228 228
229 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { 229 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const {
230 return extension_urls::kChromeWebstoreUpdateURL; 230 return extension_urls::kChromeWebstoreUpdateURL;
231 } 231 }
232 232
233 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { 233 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
234 // TODO(rockot): Maybe we want to do something else here. For now we accept 234 // TODO(rockot): Maybe we want to do something else here. For now we accept
235 // any URL as a blacklist URL because we don't really care. 235 // any URL as a blacklist URL because we don't really care.
236 return true; 236 return true;
237 } 237 }
238 238
239 } // namespace extensions 239 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/common/api/schemas.gypi ('k') | extensions/test/test_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698