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

Side by Side Diff: ash/common/system/chromeos/session/tray_session_length_limit.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 4 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
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 "ash/common/system/chromeos/session/tray_session_length_limit.h" 5 #include "ash/common/system/chromeos/session/tray_session_length_limit.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 26 matching lines...) Expand all
37 // with 1000ms). 37 // with 1000ms).
38 const int kTimerIntervalInMilliseconds = 500; 38 const int kTimerIntervalInMilliseconds = 500;
39 39
40 } // namespace 40 } // namespace
41 41
42 // static 42 // static
43 const char TraySessionLengthLimit::kNotificationId[] = 43 const char TraySessionLengthLimit::kNotificationId[] =
44 "chrome://session/timeout"; 44 "chrome://session/timeout";
45 45
46 TraySessionLengthLimit::TraySessionLengthLimit(SystemTray* system_tray) 46 TraySessionLengthLimit::TraySessionLengthLimit(SystemTray* system_tray)
47 : SystemTrayItem(system_tray), 47 : SystemTrayItem(system_tray, UMA_SESSION_LENGTH_LIMIT),
48 limit_state_(LIMIT_NONE), 48 limit_state_(LIMIT_NONE),
49 last_limit_state_(LIMIT_NONE), 49 last_limit_state_(LIMIT_NONE),
50 tray_bubble_view_(NULL) { 50 tray_bubble_view_(NULL) {
51 WmShell::Get()->system_tray_notifier()->AddSessionLengthLimitObserver(this); 51 WmShell::Get()->system_tray_notifier()->AddSessionLengthLimitObserver(this);
52 Update(); 52 Update();
53 } 53 }
54 54
55 TraySessionLengthLimit::~TraySessionLengthLimit() { 55 TraySessionLengthLimit::~TraySessionLengthLimit() {
56 WmShell::Get()->system_tray_notifier()->RemoveSessionLengthLimitObserver( 56 WmShell::Get()->system_tray_notifier()->RemoveSessionLengthLimitObserver(
57 this); 57 this);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 base::string16 TraySessionLengthLimit::ComposeTrayBubbleMessage() const { 188 base::string16 TraySessionLengthLimit::ComposeTrayBubbleMessage() const {
189 return l10n_util::GetStringFUTF16( 189 return l10n_util::GetStringFUTF16(
190 IDS_ASH_STATUS_TRAY_BUBBLE_SESSION_LENGTH_LIMIT, 190 IDS_ASH_STATUS_TRAY_BUBBLE_SESSION_LENGTH_LIMIT,
191 ui::TimeFormat::Detailed(ui::TimeFormat::FORMAT_DURATION, 191 ui::TimeFormat::Detailed(ui::TimeFormat::FORMAT_DURATION,
192 ui::TimeFormat::LENGTH_LONG, 10, 192 ui::TimeFormat::LENGTH_LONG, 10,
193 remaining_session_time_)); 193 remaining_session_time_));
194 } 194 }
195 195
196 } // namespace ash 196 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/screen_security/screen_tray_item.cc ('k') | ash/common/system/chromeos/settings/tray_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698