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

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

Issue 25603004: Leave apps running on Windows and Linux when quitting Chrome from the wrench menu. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
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/kiosk_app_update_service.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/app_mode/app_mode_utils.h" 8 #include "chrome/browser/app_mode/app_mode_utils.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browser_process_platform_part_chromeos.h" 10 #include "chrome/browser/browser_process_platform_part_chromeos.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Setup timer to force restart once the wait period expires. 50 // Setup timer to force restart once the wait period expires.
51 restart_timer_.Start( 51 restart_timer_.Start(
52 FROM_HERE, base::TimeDelta::FromMilliseconds(kForceRestartWaitTimeMs), 52 FROM_HERE, base::TimeDelta::FromMilliseconds(kForceRestartWaitTimeMs),
53 this, &KioskAppUpdateService::ForceAppUpdateRestart); 53 this, &KioskAppUpdateService::ForceAppUpdateRestart);
54 } 54 }
55 55
56 void KioskAppUpdateService::ForceAppUpdateRestart() { 56 void KioskAppUpdateService::ForceAppUpdateRestart() {
57 // Force a chrome restart (not a logout or reboot) by closing all browsers. 57 // Force a chrome restart (not a logout or reboot) by closing all browsers.
58 LOG(WARNING) << "Force closing all browsers to update kiosk app."; 58 LOG(WARNING) << "Force closing all browsers to update kiosk app.";
59 chrome::CloseAllBrowsers(); 59 chrome::CloseAllBrowsersAndQuit();
60 } 60 }
61 61
62 void KioskAppUpdateService::Shutdown() { 62 void KioskAppUpdateService::Shutdown() {
63 ExtensionService* service = profile_->GetExtensionService(); 63 ExtensionService* service = profile_->GetExtensionService();
64 if (service) 64 if (service)
65 service->RemoveUpdateObserver(this); 65 service->RemoveUpdateObserver(this);
66 } 66 }
67 67
68 void KioskAppUpdateService::OnAppUpdateAvailable(const std::string& app_id) { 68 void KioskAppUpdateService::OnAppUpdateAvailable(const std::string& app_id) {
69 DCHECK(!app_id_.empty()); 69 DCHECK(!app_id_.empty());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 BrowserContextKeyedService* 134 BrowserContextKeyedService*
135 KioskAppUpdateServiceFactory::BuildServiceInstanceFor( 135 KioskAppUpdateServiceFactory::BuildServiceInstanceFor(
136 content::BrowserContext* context) const { 136 content::BrowserContext* context) const {
137 return new KioskAppUpdateService( 137 return new KioskAppUpdateService(
138 Profile::FromBrowserContext(context), 138 Profile::FromBrowserContext(context),
139 g_browser_process->platform_part()->automatic_reboot_manager()); 139 g_browser_process->platform_part()->automatic_reboot_manager());
140 } 140 }
141 141
142 } // namespace chromeos 142 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager_unittest.cc ('k') | chrome/browser/lifetime/application_lifetime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698