| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 StartupAppLauncher::StartupAppLauncher(Profile* profile, | 58 StartupAppLauncher::StartupAppLauncher(Profile* profile, |
| 59 const std::string& app_id) | 59 const std::string& app_id) |
| 60 : profile_(profile), | 60 : profile_(profile), |
| 61 app_id_(app_id) { | 61 app_id_(app_id) { |
| 62 DCHECK(profile_); | 62 DCHECK(profile_); |
| 63 DCHECK(Extension::IdIsValid(app_id_)); | 63 DCHECK(Extension::IdIsValid(app_id_)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 StartupAppLauncher::~StartupAppLauncher() { | 66 StartupAppLauncher::~StartupAppLauncher() { |
| 67 // StartupAppLauncher can be deleted at anytime during the launch process |
| 68 // through a user bailout shortcut. |
| 69 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) |
| 70 ->RemoveObserver(this); |
| 71 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
| 67 } | 72 } |
| 68 | 73 |
| 69 void StartupAppLauncher::Start() { | 74 void StartupAppLauncher::Start() { |
| 70 DVLOG(1) << "Starting... connection = " | 75 DVLOG(1) << "Starting... connection = " |
| 71 << net::NetworkChangeNotifier::GetConnectionType(); | 76 << net::NetworkChangeNotifier::GetConnectionType(); |
| 72 StartLoadingOAuthFile(); | 77 StartLoadingOAuthFile(); |
| 73 } | 78 } |
| 74 | 79 |
| 75 void StartupAppLauncher::AddObserver(Observer* observer) { | 80 void StartupAppLauncher::AddObserver(Observer* observer) { |
| 76 observer_list_.AddObserver(observer); | 81 observer_list_.AddObserver(observer); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 DVLOG(1) << "Network up and running!"; | 281 DVLOG(1) << "Network up and running!"; |
| 277 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); | 282 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
| 278 | 283 |
| 279 BeginInstall(); | 284 BeginInstall(); |
| 280 } else { | 285 } else { |
| 281 DVLOG(1) << "Network not running yet!"; | 286 DVLOG(1) << "Network not running yet!"; |
| 282 } | 287 } |
| 283 } | 288 } |
| 284 | 289 |
| 285 } // namespace chromeos | 290 } // namespace chromeos |
| OLD | NEW |