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

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

Issue 21629003: Enable QuickOffice editor by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated version and name Created 7 years, 4 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
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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 #endif // defined(GOOGLE_CHROME_BUILD) 419 #endif // defined(GOOGLE_CHROME_BUILD)
420 420
421 #if defined(OS_CHROMEOS) 421 #if defined(OS_CHROMEOS)
422 if (!skip_session_components) { 422 if (!skip_session_components) {
423 Add(IDR_WALLPAPERMANAGER_MANIFEST, 423 Add(IDR_WALLPAPERMANAGER_MANIFEST,
424 base::FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager"))); 424 base::FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager")));
425 425
426 #if defined(GOOGLE_CHROME_BUILD) 426 #if defined(GOOGLE_CHROME_BUILD)
427 if (!command_line->HasSwitch( 427 if (!command_line->HasSwitch(
428 chromeos::switches::kDisableQuickofficeComponentApp)) { 428 chromeos::switches::kDisableQuickofficeComponentApp)) {
429 int manifest_id = IDR_QUICK_OFFICE_MANIFEST; 429 int manifest_id = IDR_QUICKOFFICE_EDITOR_MANIFEST;
430 if (command_line->HasSwitch(switches::kEnableQuickofficeEdit)) { 430 if (command_line->HasSwitch(switches::kEnableQuickofficeViewing)) {
431 manifest_id = IDR_QUICKOFFICE_EDITOR_MANIFEST; 431 manifest_id = IDR_QUICKOFFICE_VIEWING_MANIFEST;
432 } 432 }
433 std::string id = Add(manifest_id, base::FilePath( 433 std::string id = Add(manifest_id, base::FilePath(
434 FILE_PATH_LITERAL("/usr/share/chromeos-assets/quick_office"))); 434 FILE_PATH_LITERAL("/usr/share/chromeos-assets/quick_office")));
435 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) { 435 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) {
436 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for 436 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for
437 // Quickoffice. It doesn't work without temporary file system access. 437 // Quickoffice. It doesn't work without temporary file system access.
438 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 438 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
439 ExtensionService* service = 439 ExtensionService* service =
440 extensions::ExtensionSystem::Get(profile)->extension_service(); 440 extensions::ExtensionSystem::Get(profile)->extension_service();
441 GURL site = service->GetSiteForExtensionId(id); 441 GURL site = service->GetSiteForExtensionId(id);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 486 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
487 delete component->manifest; 487 delete component->manifest;
488 if (extension_service_->is_ready()) { 488 if (extension_service_->is_ready()) {
489 extension_service_-> 489 extension_service_->
490 UnloadExtension(component->extension_id, 490 UnloadExtension(component->extension_id,
491 extension_misc::UNLOAD_REASON_DISABLE); 491 extension_misc::UNLOAD_REASON_DISABLE);
492 } 492 }
493 } 493 }
494 494
495 } // namespace extensions 495 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/quick_office/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698