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

Side by Side 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: Adding comment to ScopedAllowIO.wq Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/extensions/extension_file_browser_private_api.h" 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 private: 369 private:
370 370
371 // Grants file system access permissions to file browser component. 371 // Grants file system access permissions to file browser component.
372 bool SetupFileSystemAccessPermissions() { 372 bool SetupFileSystemAccessPermissions() {
373 if (!extension_.get()) 373 if (!extension_.get())
374 return false; 374 return false;
375 375
376 // Make sure that only component extension can access the entire 376 // Make sure that only component extension can access the entire
377 // local file system. 377 // local file system.
378 if (extension_->location() != Extension::COMPONENT 378 if (extension_->location() != Extension::COMPONENT) {
379 #ifndef NDEBUG
380 && !CommandLine::ForCurrentProcess()->HasSwitch(
381 switches::kExposePrivateExtensionApi)
382 #endif
383 ) {
384 NOTREACHED() << "Private method access by non-component extension " 379 NOTREACHED() << "Private method access by non-component extension "
385 << extension_->id(); 380 << extension_->id();
386 return false; 381 return false;
387 } 382 }
388 383
389 fileapi::FileSystemPathManager* path_manager = 384 fileapi::FileSystemPathManager* path_manager =
390 profile_->GetFileSystemContext()->path_manager(); 385 profile_->GetFileSystemContext()->path_manager();
391 fileapi::ExternalFileSystemMountPointProvider* provider = 386 fileapi::ExternalFileSystemMountPointProvider* provider =
392 path_manager->external_provider(); 387 path_manager->external_provider();
393 if (!provider) 388 if (!provider)
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 SET_STRING(IDS_FILE_BROWSER, ENQUEUE); 1672 SET_STRING(IDS_FILE_BROWSER, ENQUEUE);
1678 #undef SET_STRING 1673 #undef SET_STRING
1679 1674
1680 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); 1675 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict);
1681 1676
1682 dict->SetString("PLAY_MEDIA", 1677 dict->SetString("PLAY_MEDIA",
1683 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); 1678 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY));
1684 1679
1685 return true; 1680 return true;
1686 } 1681 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader_unittest.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698