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

Unified Diff: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc

Issue 10821078: chromeos: Get rid of browser namespace usage in kiosk_mode_idle_logout.* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc
diff --git a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc
index a12dd38497094fbc7a28eb9ac39ddfc2696f554e..90f71ba5748168380f8523af17255d9637606012 100644
--- a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc
+++ b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc
@@ -18,33 +18,28 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+namespace chromeos {
+
namespace {
const int64 kLoginIdleTimeout = 100; // seconds
-} // namespace
-
-namespace browser {
+static base::LazyInstance<KioskModeIdleLogout>
+ g_kiosk_mode_idle_logout = LAZY_INSTANCE_INITIALIZER;
-void ShowIdleLogoutDialog() {
- chromeos::IdleLogoutDialogView::ShowDialog();
-}
+} // namespace
-void CloseIdleLogoutDialog() {
- chromeos::IdleLogoutDialogView::CloseDialog();
+// static
+void KioskModeIdleLogout::Initialize() {
+ g_kiosk_mode_idle_logout.Get();
}
-} // namespace browser
-
-namespace chromeos {
-
KioskModeIdleLogout::KioskModeIdleLogout() {
- if (chromeos::KioskModeSettings::Get()->is_initialized())
+ if (KioskModeSettings::Get()->is_initialized())
Setup();
else
- chromeos::KioskModeSettings::Get()->Initialize(
- base::Bind(&KioskModeIdleLogout::Setup,
- base::Unretained(this)));
+ KioskModeSettings::Get()->Initialize(base::Bind(&KioskModeIdleLogout::Setup,
+ base::Unretained(this)));
}
void KioskModeIdleLogout::Setup() {
@@ -78,12 +73,12 @@ void KioskModeIdleLogout::IdleNotify(int64 threshold) {
// the logout dialog if it's still up.
RequestNextActiveNotification();
- browser::ShowIdleLogoutDialog();
+ IdleLogoutDialogView::ShowDialog();
}
void KioskModeIdleLogout::ActiveNotify() {
// Before anything else, close the logout dialog to prevent restart
- browser::CloseIdleLogoutDialog();
+ IdleLogoutDialogView::CloseDialog();
// Now that we're active, register a request for notification for
// the next time we go idle.
@@ -91,28 +86,21 @@ void KioskModeIdleLogout::ActiveNotify() {
}
void KioskModeIdleLogout::SetupIdleNotifications() {
- chromeos::PowerManagerClient* power_manager =
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
+ PowerManagerClient* power_manager =
+ DBusThreadManager::Get()->GetPowerManagerClient();
if (!power_manager->HasObserver(this))
power_manager->AddObserver(this);
}
void KioskModeIdleLogout::RequestNextActiveNotification() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
+ DBusThreadManager::Get()->GetPowerManagerClient()->
RequestActiveNotification();
}
void KioskModeIdleLogout::RequestNextIdleNotification() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RequestIdleNotification(chromeos::KioskModeSettings::Get()->
+ DBusThreadManager::Get()->GetPowerManagerClient()->
+ RequestIdleNotification(KioskModeSettings::Get()->
GetIdleLogoutTimeout().InMilliseconds());
}
-static base::LazyInstance<KioskModeIdleLogout>
- g_kiosk_mode_idle_logout = LAZY_INSTANCE_INITIALIZER;
-
-void InitializeKioskModeIdleLogout() {
- g_kiosk_mode_idle_logout.Get();
-}
-
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698