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

Side by Side Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 2266673002: [Extensions] Remove mechanism for non-generated schemas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazyboys Created 4 years, 3 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 | « chrome/common/extensions/chrome_extensions_client.h ('k') | extensions/common/extension_api.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.h ('k') | extensions/common/extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698