| 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/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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 registrar_.Remove(this, extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, | 305 registrar_.Remove(this, extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, |
| 306 content::NotificationService::AllSources()); | 306 content::NotificationService::AllSources()); |
| 307 | 307 |
| 308 MaybeLaunchApp(); | 308 MaybeLaunchApp(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void StartupAppLauncher::Observe(int type, | 311 void StartupAppLauncher::Observe(int type, |
| 312 const content::NotificationSource& source, | 312 const content::NotificationSource& source, |
| 313 const content::NotificationDetails& details) { | 313 const content::NotificationDetails& details) { |
| 314 DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, type); | 314 DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, type); |
| 315 using UpdateDetails = const std::pair<std::string, Version>; | 315 using UpdateDetails = const std::pair<std::string, base::Version>; |
| 316 const std::string& id = content::Details<UpdateDetails>(details)->first; | 316 const std::string& id = content::Details<UpdateDetails>(details)->first; |
| 317 const Version& version = content::Details<UpdateDetails>(details)->second; | 317 const base::Version& version = |
| 318 content::Details<UpdateDetails>(details)->second; |
| 318 VLOG(1) << "Found extension update id=" << id | 319 VLOG(1) << "Found extension update id=" << id |
| 319 << " version=" << version.GetString(); | 320 << " version=" << version.GetString(); |
| 320 extension_update_found_ = true; | 321 extension_update_found_ = true; |
| 321 } | 322 } |
| 322 | 323 |
| 323 void StartupAppLauncher::OnFinishCrxInstall(const std::string& extension_id, | 324 void StartupAppLauncher::OnFinishCrxInstall(const std::string& extension_id, |
| 324 bool success) { | 325 bool success) { |
| 325 // Wait for pending updates or dependent extensions to download. | 326 // Wait for pending updates or dependent extensions to download. |
| 326 if (extensions::ExtensionSystem::Get(profile_) | 327 if (extensions::ExtensionSystem::Get(profile_) |
| 327 ->extension_service() | 328 ->extension_service() |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 // Skip copying meta data from the current installed primary app when | 557 // Skip copying meta data from the current installed primary app when |
| 557 // there is a pending update. | 558 // there is a pending update. |
| 558 if (PrimaryAppHasPendingUpdate()) | 559 if (PrimaryAppHasPendingUpdate()) |
| 559 return; | 560 return; |
| 560 | 561 |
| 561 KioskAppManager::Get()->ClearAppData(app_id_); | 562 KioskAppManager::Get()->ClearAppData(app_id_); |
| 562 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); | 563 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); |
| 563 } | 564 } |
| 564 | 565 |
| 565 } // namespace chromeos | 566 } // namespace chromeos |
| OLD | NEW |