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

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: 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 Add(IDR_GENIUS_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
359 "/usr/share/chromeos-assets/genius_app")));
358 if (browser_defaults::enable_help_app) { 360 if (browser_defaults::enable_help_app) {
359 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( 361 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
360 "/usr/share/chromeos-assets/helpapp"))); 362 "/usr/share/chromeos-assets/helpapp")));
361 } 363 }
362 #endif 364 #endif
363 365
364 // Skip all other extensions that require user session presence. 366 // Skip all other extensions that require user session presence.
365 if (!skip_session_components) { 367 if (!skip_session_components) {
366 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 368 const CommandLine* command_line = CommandLine::ForCurrentProcess();
367 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) 369 if (!command_line->HasSwitch(chromeos::switches::kGuestSession))
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 500
499 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 501 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
500 delete component->manifest; 502 delete component->manifest;
501 if (extension_service_->is_ready()) { 503 if (extension_service_->is_ready()) {
502 extension_service_-> 504 extension_service_->
503 RemoveComponentExtension(component->extension_id); 505 RemoveComponentExtension(component->extension_id);
504 } 506 }
505 } 507 }
506 508
507 } // namespace extensions 509 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698