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

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

Issue 741473002: Revert of Fire notifications when reboot is requested, not scheduled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@managed_cros
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/kiosk_app_update_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app_session_lifetime.h" 5 #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // the idle app name notification. 132 // the idle app name notification.
133 if (DemoAppLauncher::IsDemoAppSession( 133 if (DemoAppLauncher::IsDemoAppSession(
134 user_manager::UserManager::Get()->GetActiveUser()->email())) 134 user_manager::UserManager::Get()->GetActiveUser()->email()))
135 return; 135 return;
136 136
137 // Set the app_id for the current instance of KioskAppUpdateService. 137 // Set the app_id for the current instance of KioskAppUpdateService.
138 KioskAppUpdateService* update_service = 138 KioskAppUpdateService* update_service =
139 KioskAppUpdateServiceFactory::GetForProfile(profile); 139 KioskAppUpdateServiceFactory::GetForProfile(profile);
140 DCHECK(update_service); 140 DCHECK(update_service);
141 if (update_service) 141 if (update_service)
142 update_service->Init(app_id); 142 update_service->set_app_id(app_id);
143 143
144 // Start to monitor external update from usb stick. 144 // Start to monitor external update from usb stick.
145 KioskAppManager::Get()->MonitorKioskExternalUpdate(); 145 KioskAppManager::Get()->MonitorKioskExternalUpdate();
146 146
147 // If the device is not enterprise managed, set prefs to reboot after update 147 // If the device is not enterprise managed, set prefs to reboot after update
148 // and create a user security message which shows the user the application 148 // and create a user security message which shows the user the application
149 // name and author after some idle timeout. 149 // name and author after some idle timeout.
150 policy::BrowserPolicyConnectorChromeOS* connector = 150 policy::BrowserPolicyConnectorChromeOS* connector =
151 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 151 g_browser_process->platform_part()->browser_policy_connector_chromeos();
152 if (!connector->IsEnterpriseManaged()) { 152 if (!connector->IsEnterpriseManaged()) {
153 PrefService* local_state = g_browser_process->local_state(); 153 PrefService* local_state = g_browser_process->local_state();
154 local_state->SetBoolean(prefs::kRebootAfterUpdate, true); 154 local_state->SetBoolean(prefs::kRebootAfterUpdate, true);
155 KioskModeIdleAppNameNotification::Initialize(); 155 KioskModeIdleAppNameNotification::Initialize();
156 } 156 }
157 } 157 }
158 158
159 } // namespace chromeos 159 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/kiosk_app_update_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698