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

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

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. 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/extensions/extension_service.h" 18 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/extensions/install_tracker.h" 19 #include "chrome/browser/extensions/install_tracker.h"
20 #include "chrome/browser/extensions/install_tracker_factory.h" 20 #include "chrome/browser/extensions/install_tracker_factory.h"
21 #include "chrome/browser/extensions/updater/extension_updater.h" 21 #include "chrome/browser/extensions/updater/extension_updater.h"
22 #include "chrome/browser/lifetime/application_lifetime.h" 22 #include "chrome/browser/lifetime/application_lifetime.h"
23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
24 #include "chrome/browser/signin/signin_manager_factory.h" 24 #include "chrome/browser/signin/signin_manager_factory.h"
25 #include "chrome/browser/ui/extensions/application_launch.h" 25 #include "chrome/browser/ui/extensions/application_launch.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/chrome_version_info.h" 28 #include "chrome/common/chrome_version_info.h"
29 #include "chrome/common/extensions/manifest_url_handler.h" 29 #include "chrome/common/extensions/manifest_url_handler.h"
30 #include "components/crx_file/id_util.h"
30 #include "components/signin/core/browser/profile_oauth2_token_service.h" 31 #include "components/signin/core/browser/profile_oauth2_token_service.h"
31 #include "components/signin/core/browser/signin_manager.h" 32 #include "components/signin/core/browser/signin_manager.h"
32 #include "components/user_manager/user_manager.h" 33 #include "components/user_manager/user_manager.h"
33 #include "content/public/browser/browser_thread.h" 34 #include "content/public/browser/browser_thread.h"
34 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
35 #include "extensions/browser/extension_system.h" 36 #include "extensions/browser/extension_system.h"
36 #include "extensions/common/extension.h" 37 #include "extensions/common/extension.h"
37 #include "extensions/common/manifest_handlers/kiosk_mode_info.h" 38 #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
38 #include "extensions/common/manifest_handlers/offline_enabled_info.h" 39 #include "extensions/common/manifest_handlers/offline_enabled_info.h"
39 #include "google_apis/gaia/gaia_auth_consumer.h" 40 #include "google_apis/gaia/gaia_auth_consumer.h"
(...skipping 29 matching lines...) Expand all
69 StartupAppLauncher::Delegate* delegate) 70 StartupAppLauncher::Delegate* delegate)
70 : profile_(profile), 71 : profile_(profile),
71 app_id_(app_id), 72 app_id_(app_id),
72 diagnostic_mode_(diagnostic_mode), 73 diagnostic_mode_(diagnostic_mode),
73 delegate_(delegate), 74 delegate_(delegate),
74 network_ready_handled_(false), 75 network_ready_handled_(false),
75 launch_attempt_(0), 76 launch_attempt_(0),
76 ready_to_launch_(false), 77 ready_to_launch_(false),
77 wait_for_crx_update_(false) { 78 wait_for_crx_update_(false) {
78 DCHECK(profile_); 79 DCHECK(profile_);
79 DCHECK(Extension::IdIsValid(app_id_)); 80 DCHECK(crx_file::id_util::IdIsValid(app_id_));
80 KioskAppManager::Get()->AddObserver(this); 81 KioskAppManager::Get()->AddObserver(this);
81 } 82 }
82 83
83 StartupAppLauncher::~StartupAppLauncher() { 84 StartupAppLauncher::~StartupAppLauncher() {
84 KioskAppManager::Get()->RemoveObserver(this); 85 KioskAppManager::Get()->RemoveObserver(this);
85 86
86 // StartupAppLauncher can be deleted at anytime during the launch process 87 // StartupAppLauncher can be deleted at anytime during the launch process
87 // through a user bailout shortcut. 88 // through a user bailout shortcut.
88 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) 89 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
89 ->RemoveObserver(this); 90 ->RemoveObserver(this);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 ready_to_launch_ = true; 392 ready_to_launch_ = true;
392 delegate_->OnReadyToLaunch(); 393 delegate_->OnReadyToLaunch();
393 } 394 }
394 395
395 void StartupAppLauncher::UpdateAppData() { 396 void StartupAppLauncher::UpdateAppData() {
396 KioskAppManager::Get()->ClearAppData(app_id_); 397 KioskAppManager::Get()->ClearAppData(app_id_);
397 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); 398 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
398 } 399 }
399 400
400 } // namespace chromeos 401 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/apps/install_chrome_app.cc ('k') | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698