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

Side by Side Diff: extensions/common/extension_api.cc

Issue 306893003: Fix channel check for fatal error suppression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CHECK in IsAvailable Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/resources/extensions/last_error.js ('k') | no next file » | 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 "extensions/common/extension_api.h" 5 #include "extensions/common/extension_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return true; 260 return true;
261 } 261 }
262 return false; 262 return false;
263 } 263 }
264 264
265 Feature::Availability ExtensionAPI::IsAvailable(const std::string& full_name, 265 Feature::Availability ExtensionAPI::IsAvailable(const std::string& full_name,
266 const Extension* extension, 266 const Extension* extension,
267 Feature::Context context, 267 Feature::Context context,
268 const GURL& url) { 268 const GURL& url) {
269 Feature* feature = GetFeatureDependency(full_name); 269 Feature* feature = GetFeatureDependency(full_name);
270 CHECK(feature) << full_name; 270 if (!feature) {
271 return Feature::CreateAvailability(Feature::NOT_PRESENT,
272 std::string("Unknown feature: ") + full_name);
273 }
271 return IsAvailable(*feature, extension, context, url); 274 return IsAvailable(*feature, extension, context, url);
272 } 275 }
273 276
274 Feature::Availability ExtensionAPI::IsAvailable(const Feature& feature, 277 Feature::Availability ExtensionAPI::IsAvailable(const Feature& feature,
275 const Extension* extension, 278 const Extension* extension,
276 Feature::Context context, 279 Feature::Context context,
277 const GURL& url) { 280 const GURL& url) {
278 Feature::Availability availability = 281 Feature::Availability availability =
279 feature.IsAvailableToContext(extension, context, url); 282 feature.IsAvailableToContext(extension, context, url);
280 if (!availability.is_available()) 283 if (!availability.is_available())
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 break; 387 break;
385 388
386 api_name_candidate = api_name_candidate.substr(0, last_dot_index); 389 api_name_candidate = api_name_candidate.substr(0, last_dot_index);
387 } 390 }
388 391
389 *child_name = ""; 392 *child_name = "";
390 return std::string(); 393 return std::string();
391 } 394 }
392 395
393 } // namespace extensions 396 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/last_error.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698