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

Side by Side Diff: content/browser/battery_status/battery_status_manager_linux.cc

Issue 633543002: Replace OVERRIDE and FINAL with override and final in content/browser/battery_status[a-s]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/battery_status/battery_status_manager_linux.h" 5 #include "content/browser/battery_status/battery_status_manager_linux.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 class BatteryStatusManagerLinux : public BatteryStatusManager { 270 class BatteryStatusManagerLinux : public BatteryStatusManager {
271 public: 271 public:
272 explicit BatteryStatusManagerLinux( 272 explicit BatteryStatusManagerLinux(
273 const BatteryStatusService::BatteryUpdateCallback& callback) 273 const BatteryStatusService::BatteryUpdateCallback& callback)
274 : callback_(callback) {} 274 : callback_(callback) {}
275 275
276 virtual ~BatteryStatusManagerLinux() {} 276 virtual ~BatteryStatusManagerLinux() {}
277 277
278 private: 278 private:
279 // BatteryStatusManager: 279 // BatteryStatusManager:
280 virtual bool StartListeningBatteryChange() OVERRIDE { 280 virtual bool StartListeningBatteryChange() override {
281 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 281 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
282 282
283 if (!StartNotifierThreadIfNecessary()) 283 if (!StartNotifierThreadIfNecessary())
284 return false; 284 return false;
285 285
286 notifier_thread_->message_loop()->PostTask( 286 notifier_thread_->message_loop()->PostTask(
287 FROM_HERE, 287 FROM_HERE,
288 base::Bind(&BatteryStatusNotificationThread::StartListening, 288 base::Bind(&BatteryStatusNotificationThread::StartListening,
289 base::Unretained(notifier_thread_.get()))); 289 base::Unretained(notifier_thread_.get())));
290 return true; 290 return true;
291 } 291 }
292 292
293 virtual void StopListeningBatteryChange() OVERRIDE { 293 virtual void StopListeningBatteryChange() override {
294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
295 295
296 if (!notifier_thread_) 296 if (!notifier_thread_)
297 return; 297 return;
298 298
299 notifier_thread_->message_loop()->PostTask( 299 notifier_thread_->message_loop()->PostTask(
300 FROM_HERE, 300 FROM_HERE,
301 base::Bind(&BatteryStatusNotificationThread::StopListening, 301 base::Bind(&BatteryStatusNotificationThread::StopListening,
302 base::Unretained(notifier_thread_.get()))); 302 base::Unretained(notifier_thread_.get())));
303 } 303 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 375
376 // static 376 // static
377 scoped_ptr<BatteryStatusManager> BatteryStatusManager::Create( 377 scoped_ptr<BatteryStatusManager> BatteryStatusManager::Create(
378 const BatteryStatusService::BatteryUpdateCallback& callback) { 378 const BatteryStatusService::BatteryUpdateCallback& callback) {
379 return scoped_ptr<BatteryStatusManager>( 379 return scoped_ptr<BatteryStatusManager>(
380 new BatteryStatusManagerLinux(callback)); 380 new BatteryStatusManagerLinux(callback));
381 } 381 }
382 382
383 } // namespace content 383 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698