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

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

Issue 9546013: Move IsRunningOnChromeOS to base/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos_version,sync,cleanup Created 8 years, 9 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/dbus/power_manager_client.h" 5 #include "chrome/browser/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/chromeos/chromeos_version.h"
11 #include "base/format_macros.h" 12 #include "base/format_macros.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 14 #include "base/observer_list.h"
14 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
15 #include "base/time.h" 16 #include "base/time.h"
16 #include "base/timer.h" 17 #include "base/timer.h"
17 #include "chrome/browser/chromeos/dbus/power_supply_properties.pb.h" 18 #include "chrome/browser/chromeos/dbus/power_supply_properties.pb.h"
18 #include "chrome/browser/chromeos/login/screen_locker.h" 19 #include "chrome/browser/chromeos/login/screen_locker.h"
19 #include "chrome/browser/chromeos/system/runtime_environment.h"
20 #include "dbus/bus.h" 20 #include "dbus/bus.h"
21 #include "dbus/message.h" 21 #include "dbus/message.h"
22 #include "dbus/object_path.h" 22 #include "dbus/object_path.h"
23 #include "dbus/object_proxy.h" 23 #include "dbus/object_proxy.h"
24 #include "third_party/cros_system_api/dbus/service_constants.h" 24 #include "third_party/cros_system_api/dbus/service_constants.h"
25 25
26 namespace chromeos { 26 namespace chromeos {
27 27
28 #if !defined(USE_ASH) 28 #if !defined(USE_ASH)
29 PowerSupplyStatus::PowerSupplyStatus() 29 PowerSupplyStatus::PowerSupplyStatus()
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 base::RepeatingTimer<PowerManagerClientStubImpl> timer_; 530 base::RepeatingTimer<PowerManagerClientStubImpl> timer_;
531 }; 531 };
532 532
533 PowerManagerClient::PowerManagerClient() { 533 PowerManagerClient::PowerManagerClient() {
534 } 534 }
535 535
536 PowerManagerClient::~PowerManagerClient() { 536 PowerManagerClient::~PowerManagerClient() {
537 } 537 }
538 538
539 PowerManagerClient* PowerManagerClient::Create(dbus::Bus* bus) { 539 PowerManagerClient* PowerManagerClient::Create(dbus::Bus* bus) {
540 if (system::runtime_environment::IsRunningOnChromeOS()) { 540 if (base::chromeos::IsRunningOnChromeOS()) {
541 return new PowerManagerClientImpl(bus); 541 return new PowerManagerClientImpl(bus);
542 } else { 542 } else {
543 return new PowerManagerClientStubImpl(); 543 return new PowerManagerClientStubImpl();
544 } 544 }
545 } 545 }
546 546
547 } // namespace chromeos 547 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/introspectable_client.cc ('k') | chrome/browser/chromeos/dbus/sensors_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698