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

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

Issue 23548023: Add a new component app Guide to Chrome (code name GeniusApp) to replace HelpApp. Add a command lin… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update manifest.json Created 7 years, 3 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
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 void ComponentLoader::AddDefaultComponentExtensions( 349 void ComponentLoader::AddDefaultComponentExtensions(
350 bool skip_session_components) { 350 bool skip_session_components) {
351 // Do not add component extensions that have background pages here -- add them 351 // Do not add component extensions that have background pages here -- add them
352 // to AddDefaultComponentExtensionsWithBackgroundPages. 352 // to AddDefaultComponentExtensionsWithBackgroundPages.
353 #if defined(OS_CHROMEOS) 353 #if defined(OS_CHROMEOS)
354 Add(IDR_MOBILE_MANIFEST, 354 Add(IDR_MOBILE_MANIFEST,
355 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); 355 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile")));
356 356
357 #if defined(GOOGLE_CHROME_BUILD) 357 #if defined(GOOGLE_CHROME_BUILD)
358 {
359 const CommandLine* command_line = CommandLine::ForCurrentProcess();
360 if (!command_line->HasSwitch(chromeos::switches::kDisableGeniusApp)) {
361 Add(IDR_GENIUS_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
362 "/usr/share/chromeos-assets/genius_app")));
363 }
364 }
358 if (browser_defaults::enable_help_app) { 365 if (browser_defaults::enable_help_app) {
359 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( 366 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
360 "/usr/share/chromeos-assets/helpapp"))); 367 "/usr/share/chromeos-assets/helpapp")));
361 } 368 }
362 #endif 369 #endif
363 370
364 // Skip all other extensions that require user session presence. 371 // Skip all other extensions that require user session presence.
365 if (!skip_session_components) { 372 if (!skip_session_components) {
366 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 373 const CommandLine* command_line = CommandLine::ForCurrentProcess();
367 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) 374 if (!command_line->HasSwitch(chromeos::switches::kGuestSession))
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 505
499 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 506 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
500 delete component->manifest; 507 delete component->manifest;
501 if (extension_service_->is_ready()) { 508 if (extension_service_->is_ready()) {
502 extension_service_-> 509 extension_service_->
503 RemoveComponentExtension(component->extension_id); 510 RemoveComponentExtension(component->extension_id);
504 } 511 }
505 } 512 }
506 513
507 } // namespace extensions 514 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/genius_app/app_id.h ('k') | chrome/browser/resources/chromeos/genius_app/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698