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

Side by Side Diff: chrome/browser/ui/browser_list.cc

Issue 8289021: chromeos: Change all clients of LoginLibrary to use SessionManagerClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed Created 9 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/chrome_tests.gypi » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser_list.h" 5 #include "chrome/browser/ui/browser_list.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 13 matching lines...) Expand all
24 #include "content/common/notification_service.h" 24 #include "content/common/notification_service.h"
25 #include "content/common/result_codes.h" 25 #include "content/common/result_codes.h"
26 26
27 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
28 #include "chrome/browser/chrome_browser_application_mac.h" 28 #include "chrome/browser/chrome_browser_application_mac.h"
29 #endif 29 #endif
30 30
31 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
32 #include "chrome/browser/chromeos/boot_times_loader.h" 32 #include "chrome/browser/chromeos/boot_times_loader.h"
33 #include "chrome/browser/chromeos/cros/cros_library.h" 33 #include "chrome/browser/chromeos/cros/cros_library.h"
34 #include "chrome/browser/chromeos/cros/login_library.h"
35 #include "chrome/browser/chromeos/cros/update_library.h" 34 #include "chrome/browser/chromeos/cros/update_library.h"
35 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
36 #include "chrome/browser/chromeos/dbus/session_manager_client.h"
36 #if defined(TOOLKIT_USES_GTK) 37 #if defined(TOOLKIT_USES_GTK)
37 #include "chrome/browser/chromeos/wm_ipc.h" 38 #include "chrome/browser/chromeos/wm_ipc.h"
38 #endif 39 #endif
39 #endif 40 #endif
40 41
41 namespace { 42 namespace {
42 43
43 // This object is instantiated when the first Browser object is added to the 44 // This object is instantiated when the first Browser object is added to the
44 // list and delete when the last one is removed. It watches for loads and 45 // list and delete when the last one is removed. It watches for loads and
45 // creates histograms of some global object counts. 46 // creates histograms of some global object counts.
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 301
301 #if defined(OS_CHROMEOS) 302 #if defined(OS_CHROMEOS)
302 NotifyWindowManagerAboutSignout(); 303 NotifyWindowManagerAboutSignout();
303 chromeos::CrosLibrary* cros_library = chromeos::CrosLibrary::Get(); 304 chromeos::CrosLibrary* cros_library = chromeos::CrosLibrary::Get();
304 if (cros_library->EnsureLoaded()) { 305 if (cros_library->EnsureLoaded()) {
305 // If update has been installed, reboot, otherwise, sign out. 306 // If update has been installed, reboot, otherwise, sign out.
306 if (cros_library->GetUpdateLibrary()->status().status == 307 if (cros_library->GetUpdateLibrary()->status().status ==
307 chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT) { 308 chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT) {
308 cros_library->GetUpdateLibrary()->RebootAfterUpdate(); 309 cros_library->GetUpdateLibrary()->RebootAfterUpdate();
309 } else { 310 } else {
310 cros_library->GetLoginLibrary()->StopSession(""); 311 chromeos::DBusThreadManager::Get()->session_manager_client()
312 ->StopSession();
311 } 313 }
312 return; 314 return;
313 } 315 }
314 // If running the Chrome OS build, but we're not on the device, fall through 316 // If running the Chrome OS build, but we're not on the device, fall through
315 #endif 317 #endif
316 AllBrowsersClosedAndAppExiting(); 318 AllBrowsersClosedAndAppExiting();
317 } 319 }
318 320
319 // static 321 // static
320 void BrowserList::RemoveBrowser(Browser* browser) { 322 void BrowserList::RemoveBrowser(Browser* browser) {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // If no more TabContents from Browsers, check the BackgroundPrintingManager. 789 // If no more TabContents from Browsers, check the BackgroundPrintingManager.
788 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { 790 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) {
789 cur_ = *bg_printing_iterator_; 791 cur_ = *bg_printing_iterator_;
790 CHECK(cur_); 792 CHECK(cur_);
791 ++bg_printing_iterator_; 793 ++bg_printing_iterator_;
792 return; 794 return;
793 } 795 }
794 // Reached the end - no more TabContents. 796 // Reached the end - no more TabContents.
795 cur_ = NULL; 797 cur_ = NULL;
796 } 798 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698