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

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

Issue 126513005: kiosk: Load file manager in kiosk mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (!skip_session_components) { 410 if (!skip_session_components) {
411 AddWebStoreApp(); 411 AddWebStoreApp();
412 AddChromeApp(); 412 AddChromeApp();
413 } 413 }
414 414
415 AddKeyboardApp(); 415 AddKeyboardApp();
416 416
417 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components); 417 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components);
418 } 418 }
419 419
420 void ComponentLoader::AddDefaultComponentExtensionsForKioskMode(
421 bool skip_session_components) {
422 // No component extension for kiosk app launch splash screen.
423 if (skip_session_components)
424 return;
425
426 // Component extensions needed for kiosk apps.
427 AddFileManagerExtension();
428 }
429
420 void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages( 430 void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
421 bool skip_session_components) { 431 bool skip_session_components) {
422 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 432 const CommandLine* command_line = CommandLine::ForCurrentProcess();
423 433
424 // Component extensions with background pages are not enabled during tests 434 // Component extensions with background pages are not enabled during tests
425 // because they generate a lot of background behavior that can interfere. 435 // because they generate a lot of background behavior that can interfere.
426 if (!enable_background_extensions_during_testing && 436 if (!enable_background_extensions_during_testing &&
427 (command_line->HasSwitch(switches::kTestType) || 437 (command_line->HasSwitch(switches::kTestType) ||
428 command_line->HasSwitch( 438 command_line->HasSwitch(
429 switches::kDisableComponentExtensionsWithBackgroundPages))) { 439 switches::kDisableComponentExtensionsWithBackgroundPages))) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 602
593 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 603 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
594 delete component->manifest; 604 delete component->manifest;
595 if (extension_service_->is_ready()) { 605 if (extension_service_->is_ready()) {
596 extension_service_-> 606 extension_service_->
597 RemoveComponentExtension(component->extension_id); 607 RemoveComponentExtension(component->extension_id);
598 } 608 }
599 } 609 }
600 610
601 } // namespace extensions 611 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698