| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 base::StringPiece ChromeExtensionsClient::GetAPISchema( | 246 base::StringPiece ChromeExtensionsClient::GetAPISchema( |
| 247 const std::string& name) const { | 247 const std::string& name) const { |
| 248 // Test from most common to least common. | 248 // Test from most common to least common. |
| 249 if (api::ChromeGeneratedSchemas::IsGenerated(name)) | 249 if (api::ChromeGeneratedSchemas::IsGenerated(name)) |
| 250 return api::ChromeGeneratedSchemas::Get(name); | 250 return api::ChromeGeneratedSchemas::Get(name); |
| 251 | 251 |
| 252 return api::GeneratedSchemas::Get(name); | 252 return api::GeneratedSchemas::Get(name); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void ChromeExtensionsClient::RegisterAPISchemaResources( | |
| 256 ExtensionAPI* api) const { | |
| 257 } | |
| 258 | |
| 259 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { | 255 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { |
| 260 // Suppress fatal everywhere until the cause of bugs like http://crbug/471599 | 256 // Suppress fatal everywhere until the cause of bugs like http://crbug/471599 |
| 261 // are fixed. This would typically be: | 257 // are fixed. This would typically be: |
| 262 // return GetCurrentChannel() > version_info::Channel::DEV; | 258 // return GetCurrentChannel() > version_info::Channel::DEV; |
| 263 return true; | 259 return true; |
| 264 } | 260 } |
| 265 | 261 |
| 266 void ChromeExtensionsClient::RecordDidSuppressFatalError() { | 262 void ChromeExtensionsClient::RecordDidSuppressFatalError() { |
| 267 UMA_HISTOGRAM_ENUMERATION("Extensions.DidSuppressJavaScriptException", | 263 UMA_HISTOGRAM_ENUMERATION("Extensions.DidSuppressJavaScriptException", |
| 268 GetChromeChannelForHistogram(GetCurrentChannel()), | 264 GetChromeChannelForHistogram(GetCurrentChannel()), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 const { | 330 const { |
| 335 return GetCurrentChannel() == version_info::Channel::UNKNOWN; | 331 return GetCurrentChannel() == version_info::Channel::UNKNOWN; |
| 336 } | 332 } |
| 337 | 333 |
| 338 // static | 334 // static |
| 339 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 335 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
| 340 return g_client.Pointer(); | 336 return g_client.Pointer(); |
| 341 } | 337 } |
| 342 | 338 |
| 343 } // namespace extensions | 339 } // namespace extensions |
| OLD | NEW |