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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h" 14 #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
15 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 15 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
16 #include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h" 16 #include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h"
17 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 17 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
18 #include "chrome/browser/chromeos/login/users/user_manager.h"
19 #include "chrome/browser/extensions/extension_service.h" 18 #include "chrome/browser/extensions/extension_service.h"
20 #include "chrome/browser/extensions/install_tracker.h" 19 #include "chrome/browser/extensions/install_tracker.h"
21 #include "chrome/browser/extensions/install_tracker_factory.h" 20 #include "chrome/browser/extensions/install_tracker_factory.h"
22 #include "chrome/browser/extensions/updater/extension_updater.h" 21 #include "chrome/browser/extensions/updater/extension_updater.h"
23 #include "chrome/browser/lifetime/application_lifetime.h" 22 #include "chrome/browser/lifetime/application_lifetime.h"
24 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
25 #include "chrome/browser/signin/signin_manager_factory.h" 24 #include "chrome/browser/signin/signin_manager_factory.h"
26 #include "chrome/browser/ui/extensions/application_launch.h" 25 #include "chrome/browser/ui/extensions/application_launch.h"
27 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
28 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/chrome_version_info.h" 28 #include "chrome/common/chrome_version_info.h"
30 #include "chrome/common/extensions/manifest_url_handler.h" 29 #include "chrome/common/extensions/manifest_url_handler.h"
31 #include "components/signin/core/browser/profile_oauth2_token_service.h" 30 #include "components/signin/core/browser/profile_oauth2_token_service.h"
32 #include "components/signin/core/browser/signin_manager.h" 31 #include "components/signin/core/browser/signin_manager.h"
32 #include "components/user_manager/user_manager.h"
33 #include "content/public/browser/browser_thread.h" 33 #include "content/public/browser/browser_thread.h"
34 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
35 #include "extensions/browser/extension_system.h" 35 #include "extensions/browser/extension_system.h"
36 #include "extensions/common/extension.h" 36 #include "extensions/common/extension.h"
37 #include "extensions/common/manifest_handlers/kiosk_mode_info.h" 37 #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
38 #include "extensions/common/manifest_handlers/offline_enabled_info.h" 38 #include "extensions/common/manifest_handlers/offline_enabled_info.h"
39 #include "google_apis/gaia/gaia_auth_consumer.h" 39 #include "google_apis/gaia/gaia_auth_consumer.h"
40 #include "google_apis/gaia/gaia_constants.h" 40 #include "google_apis/gaia/gaia_constants.h"
41 #include "net/base/load_flags.h" 41 #include "net/base/load_flags.h"
42 #include "net/url_request/url_fetcher.h" 42 #include "net/url_request/url_fetcher.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED); 326 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED);
327 return; 327 return;
328 } 328 }
329 329
330 // Always open the app in a window. 330 // Always open the app in a window.
331 OpenApplication(AppLaunchParams(profile_, extension, 331 OpenApplication(AppLaunchParams(profile_, extension,
332 extensions::LAUNCH_CONTAINER_WINDOW, 332 extensions::LAUNCH_CONTAINER_WINDOW,
333 NEW_WINDOW)); 333 NEW_WINDOW));
334 InitAppSession(profile_, app_id_); 334 InitAppSession(profile_, app_id_);
335 335
336 UserManager::Get()->SessionStarted(); 336 user_manager::UserManager::Get()->SessionStarted();
337 337
338 content::NotificationService::current()->Notify( 338 content::NotificationService::current()->Notify(
339 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED, 339 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED,
340 content::NotificationService::AllSources(), 340 content::NotificationService::AllSources(),
341 content::NotificationService::NoDetails()); 341 content::NotificationService::NoDetails());
342 342
343 if (diagnostic_mode_) 343 if (diagnostic_mode_)
344 KioskDiagnosisRunner::Run(profile_, app_id_); 344 KioskDiagnosisRunner::Run(profile_, app_id_);
345 345
346 OnLaunchSuccess(); 346 OnLaunchSuccess();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 ready_to_launch_ = true; 391 ready_to_launch_ = true;
392 delegate_->OnReadyToLaunch(); 392 delegate_->OnReadyToLaunch();
393 } 393 }
394 394
395 void StartupAppLauncher::UpdateAppData() { 395 void StartupAppLauncher::UpdateAppData() {
396 KioskAppManager::Get()->ClearAppData(app_id_); 396 KioskAppManager::Get()->ClearAppData(app_id_);
397 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); 397 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
398 } 398 }
399 399
400 } // namespace chromeos 400 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698