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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" 10 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 } 68 }
69 69
70 void KioskModeIdleAppNameNotification::Setup() { 70 void KioskModeIdleAppNameNotification::Setup() {
71 DCHECK(user_manager::UserManager::Get()->IsUserLoggedIn()); 71 DCHECK(user_manager::UserManager::Get()->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 base::CommandLine* command_line = base::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(
82 new IdleAppNameNotificationView( 82 new IdleAppNameNotificationView(
83 kMessageVisibilityTimeMs, 83 kMessageVisibilityTimeMs,
84 kMessageAnimationTimeMs, 84 kMessageAnimationTimeMs,
85 extensions::ExtensionSystem::Get(profile 85 extensions::ExtensionSystem::Get(profile
86 )->extension_service()->GetInstalledExtension(app_id))); 86 )->extension_service()->GetInstalledExtension(app_id)));
87 show_notification_upon_next_user_activity_ = false; 87 show_notification_upon_next_user_activity_ = false;
(...skipping 30 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698