Skip to content

Commit

Permalink
|{SB_,}OVERRIDE| -> |override|
Browse files Browse the repository at this point in the history
Change all occurences of |SB_OVERRIDE| and |OVERRIDE| to |override|.
Remove redundant virtuals on functions already marked override.
Add const qualifier to SbPlayerPipeline::GetMediaTime.
See b/69794413 for details on how this was carried out.

b/69794413

Change-Id: I29e368c257f8a44417a675937bd964fe503322d0
  • Loading branch information
Cobalt Team authored and briantting committed Nov 28, 2017
1 parent cf74d90 commit 227dfbc
Show file tree
Hide file tree
Showing 419 changed files with 2,844 additions and 2,850 deletions.
4 changes: 2 additions & 2 deletions base/bind_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Parent {

class Child : public Parent {
public:
virtual void VirtualSet() OVERRIDE { value = kChildValue; }
virtual void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};

Expand All @@ -78,7 +78,7 @@ class NoRefParent {
};

class NoRefChild : public NoRefParent {
virtual void VirtualSet() OVERRIDE { value = kChildValue; }
virtual void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};

Expand Down
6 changes: 0 additions & 6 deletions base/compiler_specific.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@
#define ALIGNOF(type) __alignof__(type)
#endif

// Annotate a virtual method indicating it must be overriding a virtual
// method in the parent class.
// Use like:
// virtual void foo() OVERRIDE;
#define OVERRIDE override

// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() WARN_UNUSED_RESULT;
Expand Down
4 changes: 2 additions & 2 deletions base/debug/trace_event_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class TraceEventTestFixture : public testing::Test {
base::Unretained(this)));
}

virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
old_thread_name_ = PlatformThread::GetName();
}
virtual void TearDown() OVERRIDE {
virtual void TearDown() override {
if (TraceLog::GetInstance())
EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled());
PlatformThread::SetName(old_thread_name_ ? old_thread_name_ : "");
Expand Down
4 changes: 2 additions & 2 deletions base/file_path_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ struct UTF8TestData {
// to be a PlatformTest
class FilePathTest : public PlatformTest {
protected:
virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
PlatformTest::SetUp();
}
virtual void TearDown() OVERRIDE {
virtual void TearDown() override {
PlatformTest::TearDown();
}
};
Expand Down
4 changes: 2 additions & 2 deletions base/file_util_proxy_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class FileUtilProxyTest : public testing::Test {
bytes_written_(-1),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {}

virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
ASSERT_TRUE(file_thread_.Start());
}

virtual void TearDown() OVERRIDE {
virtual void TearDown() override {
if (file_ != kInvalidPlatformFileValue)
ClosePlatformFile(file_);
}
Expand Down
4 changes: 2 additions & 2 deletions base/file_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const int FILES_AND_DIRECTORIES =
// to be a PlatformTest
class FileUtilTest : public PlatformTest {
protected:
virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
PlatformTest::SetUp();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}
Expand Down Expand Up @@ -2157,7 +2157,7 @@ TEST_F(FileUtilTest, IsDirectoryEmpty) {
// with a common SetUp() method.
class VerifyPathControlledByUserTest : public FileUtilTest {
protected:
virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
FileUtilTest::SetUp();

// Create a basic structure used by each test.
Expand Down
4 changes: 2 additions & 2 deletions base/files/file_path_watcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class FilePathWatcherDelegate : public base::files::FilePathWatcher::Delegate {
: callback_(callback) {}

// FilePathWatcher::Delegate implementation.
virtual void OnFilePathChanged(const FilePath& path) OVERRIDE {
virtual void OnFilePathChanged(const FilePath& path) override {
callback_.Run(path, false);
}

virtual void OnFilePathError(const FilePath& path) OVERRIDE {
virtual void OnFilePathError(const FilePath& path) override {
callback_.Run(path, true);
}

Expand Down
8 changes: 4 additions & 4 deletions base/files/file_path_watcher_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TestDelegate : public TestDelegateBase {
}
~TestDelegate() {}

virtual void OnFileChanged(const FilePath& path, bool error) OVERRIDE {
virtual void OnFileChanged(const FilePath& path, bool error) override {
if (error)
ADD_FAILURE() << "Error " << path.value();
else
Expand Down Expand Up @@ -159,15 +159,15 @@ class FilePathWatcherTest : public testing::Test {
virtual ~FilePathWatcherTest() {}

protected:
virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
// Create a separate file thread in order to test proper thread usage.
base::Thread::Options options(MessageLoop::TYPE_IO, 0);
ASSERT_TRUE(file_thread_.StartWithOptions(options));
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
collector_ = new NotificationCollector();
}

virtual void TearDown() OVERRIDE {
virtual void TearDown() override {
loop_.RunUntilIdle();
}

Expand Down Expand Up @@ -289,7 +289,7 @@ class Deleter : public TestDelegateBase {
}
~Deleter() {}

virtual void OnFileChanged(const FilePath&, bool) OVERRIDE {
virtual void OnFileChanged(const FilePath&, bool) override {
watcher_.reset();
loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
Expand Down
12 changes: 6 additions & 6 deletions base/files/file_path_watcher_kqueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
FilePathWatcherImpl() : kqueue_(-1) {}

// MessageLoopForIO::Watcher overrides.
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
virtual void OnFileCanReadWithoutBlocking(int fd) override;
virtual void OnFileCanWriteWithoutBlocking(int fd) override;

// MessageLoop::DestructionObserver overrides.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
virtual void WillDestroyCurrentMessageLoop() override;

// FilePathWatcher::PlatformDelegate overrides.
virtual bool Watch(const FilePath& path,
bool recursive,
FilePathWatcher::Delegate* delegate) OVERRIDE;
virtual void Cancel() OVERRIDE;
FilePathWatcher::Delegate* delegate) override;
virtual void Cancel() override;

protected:
virtual ~FilePathWatcherImpl() {}
Expand All @@ -83,7 +83,7 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
typedef std::vector<struct kevent> EventVector;

// Can only be called on |io_message_loop_|'s thread.
virtual void CancelOnMessageLoopThread() OVERRIDE;
virtual void CancelOnMessageLoopThread() override;

// Returns true if the kevent values are error free.
bool AreKeventValuesValid(struct kevent* kevents, int count);
Expand Down
6 changes: 3 additions & 3 deletions base/files/file_path_watcher_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
public:
virtual bool Watch(const FilePath& path,
bool recursive,
FilePathWatcher::Delegate* delegate) OVERRIDE {
FilePathWatcher::Delegate* delegate) override {
return false;
}

virtual void Cancel() OVERRIDE {}
virtual void Cancel() override {}

virtual void CancelOnMessageLoopThread() OVERRIDE {}
virtual void CancelOnMessageLoopThread() override {}

protected:
virtual ~FilePathWatcherImpl() {}
Expand Down
2 changes: 1 addition & 1 deletion base/hi_res_timer_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BASE_EXPORT HighResolutionTimerManager
virtual ~HighResolutionTimerManager();

// base::SystemMonitor::PowerObserver:
virtual void OnPowerStateChange(bool on_battery_power) OVERRIDE;
virtual void OnPowerStateChange(bool on_battery_power) override;

// Returns true if the hi resolution clock could be used right now.
bool hi_res_clock_available() const { return hi_res_clock_available_; }
Expand Down
4 changes: 2 additions & 2 deletions base/json/json_file_value_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the file whose name was passed into the constructor.
virtual bool Serialize(const Value& root) OVERRIDE;
virtual bool Serialize(const Value& root) override;

// Equivalent to Serialize(root) except binary values are omitted from the
// output.
Expand All @@ -46,7 +46,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
virtual Value* Deserialize(int* error_code,
std::string* error_message) OVERRIDE;
std::string* error_message) override;

// This enum is designed to safely overlap with JSONReader::JsonParseError.
enum JsonFileError {
Expand Down
16 changes: 8 additions & 8 deletions base/json/json_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
DictionaryValue::Swap(static_cast<DictionaryValue*>(root));
}

virtual void Swap(DictionaryValue* other) OVERRIDE {
virtual void Swap(DictionaryValue* other) override {
DVLOG(1) << "Swap()ing a DictionaryValue inefficiently.";

// First deep copy to convert JSONStringValue to std::string and swap that
Expand All @@ -56,7 +56,7 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
// the method below.

virtual bool RemoveWithoutPathExpansion(const std::string& key,
Value** out) OVERRIDE {
Value** out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return DictionaryValue::RemoveWithoutPathExpansion(key, out);
Expand Down Expand Up @@ -88,7 +88,7 @@ class ListHiddenRootValue : public base::ListValue {
ListValue::Swap(static_cast<ListValue*>(root));
}

virtual void Swap(ListValue* other) OVERRIDE {
virtual void Swap(ListValue* other) override {
DVLOG(1) << "Swap()ing a ListValue inefficiently.";

// First deep copy to convert JSONStringValue to std::string and swap that
Expand All @@ -103,7 +103,7 @@ class ListHiddenRootValue : public base::ListValue {
ListValue::Swap(copy.get());
}

virtual bool Remove(size_t index, Value** out) OVERRIDE {
virtual bool Remove(size_t index, Value** out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return ListValue::Remove(index, out);
Expand Down Expand Up @@ -139,18 +139,18 @@ class JSONStringValue : public base::Value {
}

// Overridden from base::Value:
virtual bool GetAsString(std::string* out_value) const OVERRIDE {
virtual bool GetAsString(std::string* out_value) const override {
string_piece_.CopyToString(out_value);
return true;
}
virtual bool GetAsString(string16* out_value) const OVERRIDE {
virtual bool GetAsString(string16* out_value) const override {
*out_value = UTF8ToUTF16(string_piece_);
return true;
}
virtual Value* DeepCopy() const OVERRIDE {
virtual Value* DeepCopy() const override {
return new StringValue(string_piece_.as_string());
}
virtual bool Equals(const Value* other) const OVERRIDE {
virtual bool Equals(const Value* other) const override {
std::string other_string;
return other->IsType(TYPE_STRING) && other->GetAsString(&other_string) &&
StringPiece(other_string) == string_piece_;
Expand Down
4 changes: 2 additions & 2 deletions base/json/json_string_value_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the string passed into the constructor.
virtual bool Serialize(const Value& root) OVERRIDE;
virtual bool Serialize(const Value& root) override;

// Equivalent to Serialize(root) except binary values are omitted from the
// output.
Expand All @@ -52,7 +52,7 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
virtual Value* Deserialize(int* error_code,
std::string* error_message) OVERRIDE;
std::string* error_message) override;

void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
bool pretty_print() { return pretty_print_; }
Expand Down
Loading

0 comments on commit 227dfbc

Please sign in to comment.