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

Unified Diff: chrome/browser/chromeos/cros/brightness_library.cc

Issue 7541006: cros: Add missing "virtual" and OVERRIDE to overridden virtual methods of BrightnessLibrary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/brightness_library.cc
diff --git a/chrome/browser/chromeos/cros/brightness_library.cc b/chrome/browser/chromeos/cros/brightness_library.cc
index 3e3e98edd6f5026803f61aff4454c97efa072a2a..e2cf89f2750c1dd026f547ef68c3f38f72c4e1e4 100644
--- a/chrome/browser/chromeos/cros/brightness_library.cc
+++ b/chrome/browser/chromeos/cros/brightness_library.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/cros/brightness_library.h"
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/observer_list.h"
@@ -18,14 +19,15 @@ class BrightnessLibraryImpl : public BrightnessLibrary {
public:
BrightnessLibraryImpl() : brightness_connection_(NULL) {}
- ~BrightnessLibraryImpl() {
+ virtual ~BrightnessLibraryImpl() {
if (brightness_connection_) {
chromeos::DisconnectBrightness(brightness_connection_);
brightness_connection_ = NULL;
}
}
- void Init() {
+ // Begin BrightnessLibrary implementation.
+ virtual void Init() OVERRIDE {
if (CrosLibrary::Get()->EnsureLoaded()) {
CHECK(!brightness_connection_) << "Already intialized";
brightness_connection_ =
@@ -33,23 +35,24 @@ class BrightnessLibraryImpl : public BrightnessLibrary {
}
}
- void AddObserver(Observer* observer) {
+ virtual void AddObserver(Observer* observer) OVERRIDE {
observers_.AddObserver(observer);
}
- void RemoveObserver(Observer* observer) {
+ virtual void RemoveObserver(Observer* observer) OVERRIDE {
observers_.RemoveObserver(observer);
}
- void DecreaseScreenBrightness(bool allow_off) {
+ virtual void DecreaseScreenBrightness(bool allow_off) OVERRIDE {
if (chromeos::DecreaseScreenBrightness)
chromeos::DecreaseScreenBrightness(allow_off);
}
- void IncreaseScreenBrightness() {
+ virtual void IncreaseScreenBrightness() OVERRIDE {
if (chromeos::IncreaseScreenBrightness)
chromeos::IncreaseScreenBrightness();
}
+ // End BrightnessLibrary implementation.
private:
static void BrightnessChangedHandler(void* object,
@@ -86,12 +89,12 @@ class BrightnessLibraryImpl : public BrightnessLibrary {
class BrightnessLibraryStubImpl : public BrightnessLibrary {
public:
BrightnessLibraryStubImpl() {}
- ~BrightnessLibraryStubImpl() {}
- void Init() {}
- void AddObserver(Observer* observer) {}
- void RemoveObserver(Observer* observer) {}
- void DecreaseScreenBrightness(bool allow_off) {}
- void IncreaseScreenBrightness() {}
+ virtual ~BrightnessLibraryStubImpl() {}
+ virtual void Init() OVERRIDE {}
+ virtual void AddObserver(Observer* observer) OVERRIDE {}
+ virtual void RemoveObserver(Observer* observer) OVERRIDE {}
+ virtual void DecreaseScreenBrightness(bool allow_off) OVERRIDE {}
+ virtual void IncreaseScreenBrightness() OVERRIDE {}
};
// static
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698