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

Side by Side Diff: chrome/browser/chromeos/app_mode/startup_app_launcher.cc

Issue 2438063002: user_manager: Remove deps on session_manager (Closed)
Patch Set: fix nits in PS1 Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/app_mode/startup_app_launcher.h" 5 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/extensions/install_tracker_factory.h" 21 #include "chrome/browser/extensions/install_tracker_factory.h"
22 #include "chrome/browser/extensions/updater/extension_updater.h" 22 #include "chrome/browser/extensions/updater/extension_updater.h"
23 #include "chrome/browser/lifetime/application_lifetime.h" 23 #include "chrome/browser/lifetime/application_lifetime.h"
24 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 24 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
25 #include "chrome/browser/signin/signin_manager_factory.h" 25 #include "chrome/browser/signin/signin_manager_factory.h"
26 #include "chrome/browser/ui/extensions/app_launch_params.h" 26 #include "chrome/browser/ui/extensions/app_launch_params.h"
27 #include "chrome/browser/ui/extensions/application_launch.h" 27 #include "chrome/browser/ui/extensions/application_launch.h"
28 #include "chrome/common/chrome_paths.h" 28 #include "chrome/common/chrome_paths.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "components/crx_file/id_util.h" 30 #include "components/crx_file/id_util.h"
31 #include "components/session_manager/core/session_manager.h"
31 #include "components/signin/core/browser/profile_oauth2_token_service.h" 32 #include "components/signin/core/browser/profile_oauth2_token_service.h"
32 #include "components/signin/core/browser/signin_manager.h" 33 #include "components/signin/core/browser/signin_manager.h"
33 #include "components/user_manager/user_manager.h"
34 #include "content/public/browser/browser_thread.h" 34 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
36 #include "extensions/browser/extension_system.h" 36 #include "extensions/browser/extension_system.h"
37 #include "extensions/common/constants.h" 37 #include "extensions/common/constants.h"
38 #include "extensions/common/extension.h" 38 #include "extensions/common/extension.h"
39 #include "extensions/common/file_util.h" 39 #include "extensions/common/file_util.h"
40 #include "extensions/common/manifest_handlers/kiosk_mode_info.h" 40 #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
41 #include "extensions/common/manifest_handlers/offline_enabled_info.h" 41 #include "extensions/common/manifest_handlers/offline_enabled_info.h"
42 #include "extensions/common/manifest_url_handlers.h" 42 #include "extensions/common/manifest_url_handlers.h"
43 #include "google_apis/gaia/gaia_auth_consumer.h" 43 #include "google_apis/gaia/gaia_auth_consumer.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED); 462 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED);
463 return; 463 return;
464 } 464 }
465 465
466 // Always open the app in a window. 466 // Always open the app in a window.
467 OpenApplication(AppLaunchParams( 467 OpenApplication(AppLaunchParams(
468 profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW, 468 profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW,
469 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_KIOSK)); 469 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_KIOSK));
470 KioskAppManager::Get()->InitSession(profile_, app_id_); 470 KioskAppManager::Get()->InitSession(profile_, app_id_);
471 471
472 user_manager::UserManager::Get()->SessionStarted(); 472 session_manager::SessionManager::Get()->SessionStarted();
473 473
474 content::NotificationService::current()->Notify( 474 content::NotificationService::current()->Notify(
475 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED, 475 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED,
476 content::NotificationService::AllSources(), 476 content::NotificationService::AllSources(),
477 content::NotificationService::NoDetails()); 477 content::NotificationService::NoDetails());
478 478
479 if (diagnostic_mode_) 479 if (diagnostic_mode_)
480 KioskDiagnosisRunner::Run(profile_, app_id_); 480 KioskDiagnosisRunner::Run(profile_, app_id_);
481 481
482 OnLaunchSuccess(); 482 OnLaunchSuccess();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Skip copying meta data from the current installed primary app when 557 // Skip copying meta data from the current installed primary app when
558 // there is a pending update. 558 // there is a pending update.
559 if (PrimaryAppHasPendingUpdate()) 559 if (PrimaryAppHasPendingUpdate())
560 return; 560 return;
561 561
562 KioskAppManager::Get()->ClearAppData(app_id_); 562 KioskAppManager::Get()->ClearAppData(app_id_);
563 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); 563 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
564 } 564 }
565 565
566 } // namespace chromeos 566 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698