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

Unified Diff: chrome/browser/extensions/extension_file_browser_private_api.cc

Issue 8659002: Adding the --load-component-extension flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/extensions/extension.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_file_browser_private_api.cc
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc
index db22b12303f6317082dc547f256bf4737d1cbc88..aecbefd94ecc7313839a64aa151c2fae534c0a7d 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -375,11 +375,11 @@ class RequestLocalFileSystemFunction::LocalFileSystemCallbackDispatcher
// Make sure that only component extension can access the entire
// local file system.
- if (extension_->location() != Extension::COMPONENT
-#ifndef NDEBUG
- && !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kExposePrivateExtensionApi)
-#endif
+ if (extension_->location() != Extension::COMPONENT &&
+ !(extension_->location() == Extension::LOAD &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExposePrivateExtensionApi)
+ )
) {
NOTREACHED() << "Private method access by non-component extension "
<< extension_->id();
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/extensions/extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698