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

Side by Side Diff: chromeos/dbus/power_manager_client.cc

Issue 919183002: Move chromeos::device_event_log into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shut down in PostDestroyThreads. Created 5 years, 10 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 | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/shill_client_helper.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) 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 "chromeos/dbus/power_manager_client.h" 5 #include "chromeos/dbus/power_manager_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/format_macros.h" 12 #include "base/format_macros.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/power_monitor/power_monitor_device_source.h" 17 #include "base/power_monitor/power_monitor_device_source.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_split.h" 19 #include "base/strings/string_split.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "base/threading/platform_thread.h" 21 #include "base/threading/platform_thread.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "base/timer/timer.h" 23 #include "base/timer/timer.h"
24 #include "chromeos/chromeos_switches.h" 24 #include "chromeos/chromeos_switches.h"
25 #include "chromeos/dbus/power_manager/input_event.pb.h" 25 #include "chromeos/dbus/power_manager/input_event.pb.h"
26 #include "chromeos/dbus/power_manager/peripheral_battery_status.pb.h" 26 #include "chromeos/dbus/power_manager/peripheral_battery_status.pb.h"
27 #include "chromeos/dbus/power_manager/policy.pb.h" 27 #include "chromeos/dbus/power_manager/policy.pb.h"
28 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" 28 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
29 #include "chromeos/dbus/power_manager/suspend.pb.h" 29 #include "chromeos/dbus/power_manager/suspend.pb.h"
30 #include "chromeos/device_event_log.h" 30 #include "components/device_event_log/device_event_log.h"
31 #include "dbus/bus.h" 31 #include "dbus/bus.h"
32 #include "dbus/message.h" 32 #include "dbus/message.h"
33 #include "dbus/object_path.h" 33 #include "dbus/object_path.h"
34 #include "dbus/object_proxy.h" 34 #include "dbus/object_proxy.h"
35 35
36 namespace chromeos { 36 namespace chromeos {
37 37
38 // Maximum amount of time that the power manager will wait for Chrome to 38 // Maximum amount of time that the power manager will wait for Chrome to
39 // say that it's ready for the system to be suspended, in milliseconds. 39 // say that it's ready for the system to be suspended, in milliseconds.
40 const int kSuspendDelayTimeoutMs = 5000; 40 const int kSuspendDelayTimeoutMs = 5000;
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 // static 1000 // static
1001 PowerManagerClient* PowerManagerClient::Create( 1001 PowerManagerClient* PowerManagerClient::Create(
1002 DBusClientImplementationType type) { 1002 DBusClientImplementationType type) {
1003 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 1003 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
1004 return new PowerManagerClientImpl(); 1004 return new PowerManagerClientImpl();
1005 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 1005 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
1006 return new PowerManagerClientStubImpl(); 1006 return new PowerManagerClientStubImpl();
1007 } 1007 }
1008 1008
1009 } // namespace chromeos 1009 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/shill_client_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698