OLD | NEW |
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 #include "chrome/common/extensions/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); | 298 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); |
299 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); | 299 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); |
300 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); | 300 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); |
301 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); | 301 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); |
302 api->RegisterSchemaResource("types.private", | 302 api->RegisterSchemaResource("types.private", |
303 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); | 303 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); |
304 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); | 304 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); |
305 } | 305 } |
306 | 306 |
307 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { | 307 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { |
308 // Suppress fatal errors only on beta and stable channels. | 308 // Suppress fatal on all release branches. |
309 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; | 309 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_CANARY; |
310 } | 310 } |
311 | 311 |
312 std::string ChromeExtensionsClient::GetWebstoreBaseURL() const { | 312 std::string ChromeExtensionsClient::GetWebstoreBaseURL() const { |
313 std::string gallery_prefix = extension_urls::kChromeWebstoreBaseURL; | 313 std::string gallery_prefix = extension_urls::kChromeWebstoreBaseURL; |
314 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 314 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
315 switches::kAppsGalleryURL)) | 315 switches::kAppsGalleryURL)) |
316 gallery_prefix = | 316 gallery_prefix = |
317 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 317 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
318 switches::kAppsGalleryURL); | 318 switches::kAppsGalleryURL); |
319 if (EndsWith(gallery_prefix, "/", true)) | 319 if (EndsWith(gallery_prefix, "/", true)) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 369 |
370 return image_paths; | 370 return image_paths; |
371 } | 371 } |
372 | 372 |
373 // static | 373 // static |
374 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 374 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
375 return g_client.Pointer(); | 375 return g_client.Pointer(); |
376 } | 376 } |
377 | 377 |
378 } // namespace extensions | 378 } // namespace extensions |
OLD | NEW |