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

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 14190013: Add option in about:flags to disable Quickoffice component extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/browser/defaults.cc ('k') | chromeos/chromeos_switches.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 base::FilePath(FILE_PATH_LITERAL("settings_app"))); 435 base::FilePath(FILE_PATH_LITERAL("settings_app")));
436 #endif 436 #endif
437 } 437 }
438 438
439 #if defined(OS_CHROMEOS) 439 #if defined(OS_CHROMEOS)
440 if (!skip_session_components) { 440 if (!skip_session_components) {
441 Add(IDR_WALLPAPERMANAGER_MANIFEST, 441 Add(IDR_WALLPAPERMANAGER_MANIFEST,
442 base::FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager"))); 442 base::FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager")));
443 443
444 #if defined(GOOGLE_CHROME_BUILD) 444 #if defined(GOOGLE_CHROME_BUILD)
445 if (browser_defaults::enable_component_quick_office) { 445 if (!command_line->HasSwitch(
446 chromeos::switches::kDisableQuickofficeComponentApp)) {
446 std::string id = Add(IDR_QUICK_OFFICE_MANIFEST, base::FilePath( 447 std::string id = Add(IDR_QUICK_OFFICE_MANIFEST, base::FilePath(
447 FILE_PATH_LITERAL("/usr/share/chromeos-assets/quick_office"))); 448 FILE_PATH_LITERAL("/usr/share/chromeos-assets/quick_office")));
448 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) { 449 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) {
449 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for 450 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for
450 // Quickoffice. It doesn't work without temporary file system access. 451 // Quickoffice. It doesn't work without temporary file system access.
451 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 452 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
452 ExtensionService* service = 453 ExtensionService* service =
453 extensions::ExtensionSystem::Get(profile)->extension_service(); 454 extensions::ExtensionSystem::Get(profile)->extension_service();
454 GURL site = service->GetSiteForExtensionId(id); 455 GURL site = service->GetSiteForExtensionId(id);
455 fileapi::FileSystemContext* context = 456 fileapi::FileSystemContext* context =
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 void ComponentLoader::RegisterUserPrefs(PrefRegistrySyncable* registry) { 505 void ComponentLoader::RegisterUserPrefs(PrefRegistrySyncable* registry) {
505 registry->RegisterStringPref(prefs::kEnterpriseWebStoreURL, 506 registry->RegisterStringPref(prefs::kEnterpriseWebStoreURL,
506 std::string() /* default_value */, 507 std::string() /* default_value */,
507 PrefRegistrySyncable::UNSYNCABLE_PREF); 508 PrefRegistrySyncable::UNSYNCABLE_PREF);
508 registry->RegisterStringPref(prefs::kEnterpriseWebStoreName, 509 registry->RegisterStringPref(prefs::kEnterpriseWebStoreName,
509 std::string() /* default_value */, 510 std::string() /* default_value */,
510 PrefRegistrySyncable::UNSYNCABLE_PREF); 511 PrefRegistrySyncable::UNSYNCABLE_PREF);
511 } 512 }
512 513
513 } // namespace extensions 514 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698