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

Side by Side Diff: chrome/browser/chromeos/low_battery_observer.cc

Issue 3412033: Make feedback failure notification non sticky (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: " Created 10 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
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/chromeos/network_message_observer.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/low_battery_observer.h" 5 #include "chrome/browser/chromeos/low_battery_observer.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/time_format.h" 9 #include "chrome/common/time_format.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 } else { 66 } else {
67 if (!line_power && remaining_minutes <= limit_min) { 67 if (!line_power && remaining_minutes <= limit_min) {
68 Show(remaining, urgent); 68 Show(remaining, urgent);
69 } 69 }
70 } 70 }
71 } 71 }
72 72
73 void LowBatteryObserver::Show(base::TimeDelta remaining, bool urgent) { 73 void LowBatteryObserver::Show(base::TimeDelta remaining, bool urgent) {
74 notification_.Show(l10n_util::GetStringFUTF16(IDS_LOW_BATTERY_MESSAGE, 74 notification_.Show(l10n_util::GetStringFUTF16(IDS_LOW_BATTERY_MESSAGE,
75 TimeFormat::TimeRemaining(remaining)), urgent); 75 TimeFormat::TimeRemaining(remaining)), urgent, true);
76 remaining_ = remaining.InMinutes(); 76 remaining_ = remaining.InMinutes();
77 } 77 }
78 78
79 void LowBatteryObserver::Hide() { 79 void LowBatteryObserver::Hide() {
80 notification_.Hide(); 80 notification_.Hide();
81 } 81 }
82 82
83 } // namespace chromeos 83 } // namespace chromeos
84
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/chromeos/network_message_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698