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

Side by Side Diff: chrome/browser/chromeos/power/peripheral_battery_observer.cc

Issue 14361004: Lower kLowBatteryLevel from 15 to 5 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/power/peripheral_battery_observer.h" 5 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/base/resource/resource_bundle.h" 26 #include "ui/base/resource/resource_bundle.h"
27 #include "ui/gfx/image/image.h" 27 #include "ui/gfx/image/image.h"
28 28
29 namespace chromeos { 29 namespace chromeos {
30 30
31 namespace { 31 namespace {
32 32
33 // When a peripheral device's battery level is <= kLowBatteryLevel, consider 33 // When a peripheral device's battery level is <= kLowBatteryLevel, consider
34 // it to be in low battery condition. 34 // it to be in low battery condition.
35 const int kLowBatteryLevel = 15; 35 const int kLowBatteryLevel = 5;
36 36
37 // Don't show 2 low battery notification within |kNotificationIntervalSec| 37 // Don't show 2 low battery notification within |kNotificationIntervalSec|
38 // seconds. 38 // seconds.
39 const int kNotificationIntervalSec = 60; 39 const int kNotificationIntervalSec = 60;
40 40
41 const char kNotificationOriginUrl[] = "chrome://peripheral-battery"; 41 const char kNotificationOriginUrl[] = "chrome://peripheral-battery";
42 42
43 // HID Bluetooth device's battery sysfs entry path looks like 43 // HID Bluetooth device's battery sysfs entry path looks like
44 // "/sys/class/power_supply/hid-AA:BB:CC:DD:EE:FF-battery". 44 // "/sys/class/power_supply/hid-AA:BB:CC:DD:EE:FF-battery".
45 // Here the bluetooth address is showed in reverse order and its true 45 // Here the bluetooth address is showed in reverse order and its true
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 ProfileManager::GetDefaultProfileOrOffTheRecord()); 230 ProfileManager::GetDefaultProfileOrOffTheRecord());
231 231
232 return true; 232 return true;
233 } 233 }
234 234
235 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { 235 void PeripheralBatteryObserver::CancelNotification(const std::string& address) {
236 g_browser_process->notification_ui_manager()->CancelById(address); 236 g_browser_process->notification_ui_manager()->CancelById(address);
237 } 237 }
238 238
239 } // namespace chromeos 239 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698