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

Side by Side Diff: chrome/browser/chromeos/cros/power_library.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/cros/power_library.h" 5 #include "chrome/browser/chromeos/cros/power_library.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // The stub implementation runs the battery up and down, pausing at the 166 // The stub implementation runs the battery up and down, pausing at the
167 // fully charged and fully depleted states. 167 // fully charged and fully depleted states.
168 class PowerLibraryStubImpl : public PowerLibrary { 168 class PowerLibraryStubImpl : public PowerLibrary {
169 public: 169 public:
170 PowerLibraryStubImpl() 170 PowerLibraryStubImpl()
171 : discharging_(true), 171 : discharging_(true),
172 battery_percentage_(20), 172 battery_percentage_(20),
173 pause_count_(0) { 173 pause_count_(0) {
174 timer_.Start( 174 timer_.Start(
175 FROM_HERE,
176 base::TimeDelta::FromMilliseconds(100), 175 base::TimeDelta::FromMilliseconds(100),
177 this, 176 this,
178 &PowerLibraryStubImpl::Update); 177 &PowerLibraryStubImpl::Update);
179 } 178 }
180 179
181 virtual ~PowerLibraryStubImpl() {} 180 virtual ~PowerLibraryStubImpl() {}
182 181
183 // Begin PowerLibrary implementation. 182 // Begin PowerLibrary implementation.
184 virtual void Init() OVERRIDE {} 183 virtual void Init() OVERRIDE {}
185 virtual void AddObserver(Observer* observer) OVERRIDE { 184 virtual void AddObserver(Observer* observer) OVERRIDE {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 impl = new PowerLibraryImpl(); 261 impl = new PowerLibraryImpl();
263 impl->Init(); 262 impl->Init();
264 return impl; 263 return impl;
265 } 264 }
266 265
267 } // namespace chromeos 266 } // namespace chromeos
268 267
269 // Allows InvokeLater without adding refcounting. This class is a Singleton and 268 // Allows InvokeLater without adding refcounting. This class is a Singleton and
270 // won't be deleted until it's last InvokeLater is run. 269 // won't be deleted until it's last InvokeLater is run.
271 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::PowerLibraryImpl); 270 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::PowerLibraryImpl);
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/login_library.cc ('k') | chrome/browser/chromeos/customization_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698