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

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

Issue 23524005: Introduce AppsClient and use it in apps to get the loaded profiles list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 months 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 | Annotate | Revision Log
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 "apps/shell_window_registry.h" 7 #include "apps/shell_window_registry.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h" 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h"
13 #include "chrome/browser/lifetime/application_lifetime.h" 13 #include "chrome/browser/lifetime/application_lifetime.h"
14 #include "chrome/browser/policy/browser_policy_connector.h" 14 #include "chrome/browser/policy/browser_policy_connector.h"
15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
16 17
17 using apps::ShellWindowRegistry; 18 using apps::ShellWindowRegistry;
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 namespace { 22 namespace {
22 23
23 // AppWindowWatcher watches for app window and exits the session when the 24 // AppWindowWatcher watches for app window and exits the session when the
24 // last app window is closed. 25 // last app window is closed.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 update_service->set_app_id(app_id); 70 update_service->set_app_id(app_id);
70 71
71 // If the device is not enterprise managed, set prefs to reboot after update. 72 // If the device is not enterprise managed, set prefs to reboot after update.
72 if (!g_browser_process->browser_policy_connector()->IsEnterpriseManaged()) { 73 if (!g_browser_process->browser_policy_connector()->IsEnterpriseManaged()) {
73 PrefService* local_state = g_browser_process->local_state(); 74 PrefService* local_state = g_browser_process->local_state();
74 local_state->SetBoolean(prefs::kRebootAfterUpdate, true); 75 local_state->SetBoolean(prefs::kRebootAfterUpdate, true);
75 } 76 }
76 } 77 }
77 78
78 } // namespace chromeos 79 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698