OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/status/power_menu_button.h" | 5 #include "chrome/browser/chromeos/status/power_menu_button.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/debug/stack_trace.h" |
10 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
11 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
12 #include "base/time.h" | 13 #include "base/time.h" |
13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 15 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
15 #include "chrome/browser/chromeos/status/status_area_bubble.h" | 16 #include "chrome/browser/chromeos/status/status_area_bubble.h" |
16 #include "chrome/browser/chromeos/view_ids.h" | 17 #include "chrome/browser/chromeos/view_ids.h" |
17 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
18 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
19 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // If previous is 0, then it either was never set (initial condition) | 376 // If previous is 0, then it either was never set (initial condition) |
376 // or got down to 0. | 377 // or got down to 0. |
377 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) || | 378 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) || |
378 diff < kMinDiff || | 379 diff < kMinDiff || |
379 diff > kMaxDiff) { | 380 diff > kMaxDiff) { |
380 *previous = current; | 381 *previous = current; |
381 } | 382 } |
382 } | 383 } |
383 | 384 |
384 } // namespace chromeos | 385 } // namespace chromeos |
OLD | NEW |