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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_mode_idle_app_name_notification .h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ash::Shell::GetInstance()->user_activity_detector()->HasObserver(this)) { 61 ash::Shell::GetInstance()->user_activity_detector()->HasObserver(this)) {
62 ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this); 62 ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this);
63 // At this time the DBusThreadManager might already be gone. 63 // At this time the DBusThreadManager might already be gone.
64 if (chromeos::DBusThreadManager::IsInitialized()) 64 if (chromeos::DBusThreadManager::IsInitialized())
65 chromeos::DBusThreadManager::Get()->GetPowerManagerClient( 65 chromeos::DBusThreadManager::Get()->GetPowerManagerClient(
66 )->RemoveObserver(this); 66 )->RemoveObserver(this);
67 } 67 }
68 } 68 }
69 69
70 void KioskModeIdleAppNameNotification::Setup() { 70 void KioskModeIdleAppNameNotification::Setup() {
71 DCHECK(UserManager::Get()->IsUserLoggedIn()); 71 DCHECK(GetUserManager()->IsUserLoggedIn());
72 Start(); 72 Start();
73 } 73 }
74 74
75 void KioskModeIdleAppNameNotification::OnUserActivity(const ui::Event* event) { 75 void KioskModeIdleAppNameNotification::OnUserActivity(const ui::Event* event) {
76 if (show_notification_upon_next_user_activity_) { 76 if (show_notification_upon_next_user_activity_) {
77 CommandLine* command_line = CommandLine::ForCurrentProcess(); 77 CommandLine* command_line = CommandLine::ForCurrentProcess();
78 const std::string app_id = 78 const std::string app_id =
79 command_line->GetSwitchValueASCII(::switches::kAppId); 79 command_line->GetSwitchValueASCII(::switches::kAppId);
80 Profile* profile = ProfileManager::GetActiveUserProfile(); 80 Profile* profile = ProfileManager::GetActiveUserProfile();
81 notification_.reset( 81 notification_.reset(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 base::Bind(&KioskModeIdleAppNameNotification::OnTimeout, 118 base::Bind(&KioskModeIdleAppNameNotification::OnTimeout,
119 base::Unretained(this))); 119 base::Unretained(this)));
120 } 120 }
121 } 121 }
122 122
123 void KioskModeIdleAppNameNotification::OnTimeout() { 123 void KioskModeIdleAppNameNotification::OnTimeout() {
124 show_notification_upon_next_user_activity_ = true; 124 show_notification_upon_next_user_activity_ = true;
125 } 125 }
126 126
127 } // namespace chromeos 127 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/app_session_lifetime.cc ('k') | chrome/browser/chromeos/app_mode/startup_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698