OLD | NEW |
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" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 KioskAppManager::Get()->AddObserver(this); | 83 KioskAppManager::Get()->AddObserver(this); |
84 } | 84 } |
85 | 85 |
86 StartupAppLauncher::~StartupAppLauncher() { | 86 StartupAppLauncher::~StartupAppLauncher() { |
87 KioskAppManager::Get()->RemoveObserver(this); | 87 KioskAppManager::Get()->RemoveObserver(this); |
88 | 88 |
89 // StartupAppLauncher can be deleted at anytime during the launch process | 89 // StartupAppLauncher can be deleted at anytime during the launch process |
90 // through a user bailout shortcut. | 90 // through a user bailout shortcut. |
91 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) | 91 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) |
92 ->RemoveObserver(this); | 92 ->RemoveObserver(this); |
| 93 extensions::InstallTrackerFactory::GetForBrowserContext(profile_) |
| 94 ->RemoveObserver(this); |
93 } | 95 } |
94 | 96 |
95 void StartupAppLauncher::Initialize() { | 97 void StartupAppLauncher::Initialize() { |
96 StartLoadingOAuthFile(); | 98 StartLoadingOAuthFile(); |
97 } | 99 } |
98 | 100 |
99 void StartupAppLauncher::ContinueWithNetworkReady() { | 101 void StartupAppLauncher::ContinueWithNetworkReady() { |
100 if (!network_ready_handled_) { | 102 if (!network_ready_handled_) { |
101 network_ready_handled_ = true; | 103 network_ready_handled_ = true; |
102 // The network might not be ready when KioskAppManager tries to update | 104 // The network might not be ready when KioskAppManager tries to update |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 UpdateAppData(); | 397 UpdateAppData(); |
396 delegate_->OnReadyToLaunch(); | 398 delegate_->OnReadyToLaunch(); |
397 } | 399 } |
398 | 400 |
399 void StartupAppLauncher::UpdateAppData() { | 401 void StartupAppLauncher::UpdateAppData() { |
400 KioskAppManager::Get()->ClearAppData(app_id_); | 402 KioskAppManager::Get()->ClearAppData(app_id_); |
401 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); | 403 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); |
402 } | 404 } |
403 | 405 |
404 } // namespace chromeos | 406 } // namespace chromeos |
OLD | NEW |