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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); | 292 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); |
293 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); | 293 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); |
294 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); | 294 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); |
295 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); | 295 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); |
296 api->RegisterSchemaResource("types.private", | 296 api->RegisterSchemaResource("types.private", |
297 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); | 297 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); |
298 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); | 298 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); |
299 } | 299 } |
300 | 300 |
301 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { | 301 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { |
302 // Suppress fatal on all release branches. | 302 // Suppress fatal everywhere until the cause of bugs like http://crbug/471599 |
303 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_CANARY; | 303 // are fixed. This would typically be: |
| 304 // return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; |
| 305 return true; |
304 } | 306 } |
305 | 307 |
306 std::string ChromeExtensionsClient::GetWebstoreBaseURL() const { | 308 std::string ChromeExtensionsClient::GetWebstoreBaseURL() const { |
307 std::string gallery_prefix = extension_urls::kChromeWebstoreBaseURL; | 309 std::string gallery_prefix = extension_urls::kChromeWebstoreBaseURL; |
308 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 310 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
309 switches::kAppsGalleryURL)) | 311 switches::kAppsGalleryURL)) |
310 gallery_prefix = | 312 gallery_prefix = |
311 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 313 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
312 switches::kAppsGalleryURL); | 314 switches::kAppsGalleryURL); |
313 if (EndsWith(gallery_prefix, "/", true)) | 315 if (EndsWith(gallery_prefix, "/", true)) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 365 |
364 return image_paths; | 366 return image_paths; |
365 } | 367 } |
366 | 368 |
367 // static | 369 // static |
368 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 370 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
369 return g_client.Pointer(); | 371 return g_client.Pointer(); |
370 } | 372 } |
371 | 373 |
372 } // namespace extensions | 374 } // namespace extensions |
OLD | NEW |