Commit 5648818e authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final in base/

BUG=417463
TBR=danakj@chromium.org

Review URL: https://codereview.chromium.org/668783004

Cr-Commit-Position: refs/heads/master@{#300447}
parent 08038795
......@@ -54,7 +54,7 @@ class BASE_EXPORT AsyncSocketIoHandler
#endif
public:
AsyncSocketIoHandler();
virtual ~AsyncSocketIoHandler();
~AsyncSocketIoHandler() override;
// Type definition for the callback. The parameter tells how many
// bytes were read and is 0 if an error occurred.
......@@ -81,8 +81,8 @@ class BASE_EXPORT AsyncSocketIoHandler
DWORD error) override;
#elif defined(OS_POSIX)
// Implementation of base::MessageLoopForIO::Watcher.
virtual void OnFileCanWriteWithoutBlocking(int socket) override {}
virtual void OnFileCanReadWithoutBlocking(int socket) override;
void OnFileCanWriteWithoutBlocking(int socket) override {}
void OnFileCanReadWithoutBlocking(int socket) override;
void EnsureWatchingSocket();
#endif
......
......@@ -66,7 +66,7 @@ class Parent {
class Child : public Parent {
public:
virtual void VirtualSet() override { value = kChildValue; }
void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};
......@@ -78,7 +78,7 @@ class NoRefParent {
};
class NoRefChild : public NoRefParent {
virtual void VirtualSet() override { value = kChildValue; }
void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};
......
......@@ -402,7 +402,7 @@ class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
public:
PrintBacktraceOutputHandler() {}
virtual void HandleOutput(const char* output) override {
void HandleOutput(const char* output) override {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
PrintToStderr(output);
......@@ -417,9 +417,7 @@ class StreamBacktraceOutputHandler : public BacktraceOutputHandler {
explicit StreamBacktraceOutputHandler(std::ostream* os) : os_(os) {
}
virtual void HandleOutput(const char* output) override {
(*os_) << output;
}
void HandleOutput(const char* output) override { (*os_) << output; }
private:
std::ostream* os_;
......
......@@ -40,10 +40,10 @@ class BASE_EXPORT TracedValue : public ConvertableToTraceFormat {
void BeginArray();
void BeginDictionary();
virtual void AppendAsTraceFormat(std::string* out) const override;
void AppendAsTraceFormat(std::string* out) const override;
private:
virtual ~TracedValue();
~TracedValue() override;
DictionaryValue* GetCurrentDictionary();
ListValue* GetCurrentArray();
......
......@@ -140,7 +140,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
recyclable_chunks_queue_[i] = i;
}
virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
// Because the number of threads is much less than the number of chunks,
// the queue should never be empty.
DCHECK(!QueueIsEmpty());
......@@ -162,8 +162,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
return scoped_ptr<TraceBufferChunk>(chunk);
}
virtual void ReturnChunk(size_t index,
scoped_ptr<TraceBufferChunk> chunk) override {
void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk> chunk) override {
// When this method is called, the queue should not be full because it
// can contain all chunks including the one to be returned.
DCHECK(!QueueIsFull());
......@@ -175,20 +174,18 @@ class TraceBufferRingBuffer : public TraceBuffer {
queue_tail_ = NextQueueIndex(queue_tail_);
}
virtual bool IsFull() const override {
return false;
}
bool IsFull() const override { return false; }
virtual size_t Size() const override {
size_t Size() const override {
// This is approximate because not all of the chunks are full.
return chunks_.size() * kTraceBufferChunkSize;
}
virtual size_t Capacity() const override {
size_t Capacity() const override {
return max_chunks_ * kTraceBufferChunkSize;
}
virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
if (handle.chunk_index >= chunks_.size())
return NULL;
TraceBufferChunk* chunk = chunks_[handle.chunk_index];
......@@ -197,7 +194,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
return chunk->GetEventAt(handle.event_index);
}
virtual const TraceBufferChunk* NextChunk() override {
const TraceBufferChunk* NextChunk() override {
if (chunks_.empty())
return NULL;
......@@ -212,7 +209,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
return NULL;
}
virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
scoped_ptr<TraceBuffer> CloneForIteration() const override {
scoped_ptr<ClonedTraceBuffer> cloned_buffer(new ClonedTraceBuffer());
for (size_t queue_index = queue_head_; queue_index != queue_tail_;
queue_index = NextQueueIndex(queue_index)) {
......@@ -231,26 +228,25 @@ class TraceBufferRingBuffer : public TraceBuffer {
ClonedTraceBuffer() : current_iteration_index_(0) {}
// The only implemented method.
virtual const TraceBufferChunk* NextChunk() override {
const TraceBufferChunk* NextChunk() override {
return current_iteration_index_ < chunks_.size() ?
chunks_[current_iteration_index_++] : NULL;
}
virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBufferChunk>();
}
virtual void ReturnChunk(size_t index,
scoped_ptr<TraceBufferChunk>) override {
void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk>) override {
NOTIMPLEMENTED();
}
virtual bool IsFull() const override { return false; }
virtual size_t Size() const override { return 0; }
virtual size_t Capacity() const override { return 0; }
virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
bool IsFull() const override { return false; }
size_t Size() const override { return 0; }
size_t Capacity() const override { return 0; }
TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
return NULL;
}
virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
scoped_ptr<TraceBuffer> CloneForIteration() const override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBuffer>();
}
......@@ -306,7 +302,7 @@ class TraceBufferVector : public TraceBuffer {
chunks_.reserve(max_chunks_);
}
virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
// This function may be called when adding normal events or indirectly from
// AddMetadataEventsWhileLocked(). We can not DECHECK(!IsFull()) because we
// have to add the metadata events and flush thread-local buffers even if
......@@ -319,8 +315,7 @@ class TraceBufferVector : public TraceBuffer {
new TraceBufferChunk(static_cast<uint32>(*index) + 1));
}
virtual void ReturnChunk(size_t index,
scoped_ptr<TraceBufferChunk> chunk) override {
void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk> chunk) override {
DCHECK_GT(in_flight_chunk_count_, 0u);
DCHECK_LT(index, chunks_.size());
DCHECK(!chunks_[index]);
......@@ -328,20 +323,18 @@ class TraceBufferVector : public TraceBuffer {
chunks_[index] = chunk.release();
}
virtual bool IsFull() const override {
return chunks_.size() >= max_chunks_;
}
bool IsFull() const override { return chunks_.size() >= max_chunks_; }
virtual size_t Size() const override {
size_t Size() const override {
// This is approximate because not all of the chunks are full.
return chunks_.size() * kTraceBufferChunkSize;
}
virtual size_t Capacity() const override {
size_t Capacity() const override {
return max_chunks_ * kTraceBufferChunkSize;
}
virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
if (handle.chunk_index >= chunks_.size())
return NULL;
TraceBufferChunk* chunk = chunks_[handle.chunk_index];
......@@ -350,7 +343,7 @@ class TraceBufferVector : public TraceBuffer {
return chunk->GetEventAt(handle.event_index);
}
virtual const TraceBufferChunk* NextChunk() override {
const TraceBufferChunk* NextChunk() override {
while (current_iteration_index_ < chunks_.size()) {
// Skip in-flight chunks.
const TraceBufferChunk* chunk = chunks_[current_iteration_index_++];
......@@ -360,7 +353,7 @@ class TraceBufferVector : public TraceBuffer {
return NULL;
}
virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
scoped_ptr<TraceBuffer> CloneForIteration() const override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBuffer>();
}
......@@ -866,10 +859,10 @@ class TraceBucketData {
class TraceSamplingThread : public PlatformThread::Delegate {
public:
TraceSamplingThread();
virtual ~TraceSamplingThread();
~TraceSamplingThread() override;
// Implementation of PlatformThread::Delegate:
virtual void ThreadMain() override;
void ThreadMain() override;
static void DefaultSamplingCallback(TraceBucketData* bucekt_data);
......@@ -1047,7 +1040,7 @@ class TraceLog::ThreadLocalEventBuffer
: public MessageLoop::DestructionObserver {
public:
ThreadLocalEventBuffer(TraceLog* trace_log);
virtual ~ThreadLocalEventBuffer();
~ThreadLocalEventBuffer() override;
TraceEvent* AddTraceEvent(TraceEventHandle* handle);
......@@ -1066,7 +1059,7 @@ class TraceLog::ThreadLocalEventBuffer
private:
// MessageLoop::DestructionObserver
virtual void WillDestroyCurrentMessageLoop() override;
void WillDestroyCurrentMessageLoop() override;
void FlushWhileLocked();
......
......@@ -33,12 +33,12 @@ class MemoryDumpHolder : public base::debug::ConvertableToTraceFormat {
explicit MemoryDumpHolder(char* dump) : dump_(dump) {}
// base::debug::ConvertableToTraceFormat overrides:
virtual void AppendAsTraceFormat(std::string* out) const override {
void AppendAsTraceFormat(std::string* out) const override {
AppendHeapProfileAsTraceFormat(dump_, out);
}
private:
virtual ~MemoryDumpHolder() { free(dump_); }
~MemoryDumpHolder() override { free(dump_); }
char* dump_;
......
......@@ -47,8 +47,8 @@ class BASE_EXPORT TraceMemoryController
virtual ~TraceMemoryController();
// base::debug::TraceLog::EnabledStateChangedObserver overrides:
virtual void OnTraceLogEnabled() override;
virtual void OnTraceLogDisabled() override;
void OnTraceLogEnabled() override;
void OnTraceLogDisabled() override;
// Starts heap memory profiling.
void StartProfiling();
......
......@@ -23,7 +23,7 @@ class TraceEventSyntheticDelayRegistry : public TraceEventSyntheticDelayClock {
void ResetAllDelays();
// TraceEventSyntheticDelayClock implementation.
virtual base::TimeTicks Now() override;
base::TimeTicks Now() override;
private:
TraceEventSyntheticDelayRegistry();
......
......@@ -26,7 +26,7 @@ class TraceEventSyntheticDelayTest : public testing::Test,
}
// TraceEventSyntheticDelayClock implementation.
virtual base::TimeTicks Now() override {
base::TimeTicks Now() override {
AdvanceTime(base::TimeDelta::FromMilliseconds(kShortDurationMs / 10));
return now_;
}
......
......@@ -31,12 +31,12 @@ class SystemStatsHolder : public base::debug::ConvertableToTraceFormat {
void GetSystemProfilingStats();
// base::debug::ConvertableToTraceFormat overrides:
virtual void AppendAsTraceFormat(std::string* out) const override {
void AppendAsTraceFormat(std::string* out) const override {
AppendSystemProfileAsTraceFormat(system_stats_, out);
}
private:
virtual ~SystemStatsHolder() { }
~SystemStatsHolder() override {}
SystemMetrics system_stats_;
......
......@@ -36,8 +36,8 @@ class BASE_EXPORT TraceEventSystemStatsMonitor
virtual ~TraceEventSystemStatsMonitor();
// base::debug::TraceLog::EnabledStateChangedObserver overrides:
virtual void OnTraceLogEnabled() override;
virtual void OnTraceLogDisabled() override;
void OnTraceLogEnabled() override;
void OnTraceLogDisabled() override;
// Retrieves system profiling at the current time.
void DumpSystemStats();
......
......@@ -995,11 +995,11 @@ class AfterStateChangeEnabledStateObserver
virtual ~AfterStateChangeEnabledStateObserver() {}
// TraceLog::EnabledStateObserver overrides:
virtual void OnTraceLogEnabled() override {
void OnTraceLogEnabled() override {
EXPECT_TRUE(TraceLog::GetInstance()->IsEnabled());
}
virtual void OnTraceLogDisabled() override {
void OnTraceLogDisabled() override {
EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled());
}
};
......@@ -1028,9 +1028,9 @@ class SelfRemovingEnabledStateObserver
virtual ~SelfRemovingEnabledStateObserver() {}
// TraceLog::EnabledStateObserver overrides:
virtual void OnTraceLogEnabled() override {}
void OnTraceLogEnabled() override {}
virtual void OnTraceLogDisabled() override {
void OnTraceLogDisabled() override {
TraceLog::GetInstance()->RemoveEnabledStateObserver(this);
}
};
......@@ -1918,12 +1918,12 @@ class MyData : public ConvertableToTraceFormat {
public:
MyData() {}
virtual void AppendAsTraceFormat(std::string* out) const override {
void AppendAsTraceFormat(std::string* out) const override {
out->append("{\"foo\":1}");
}
private:
virtual ~MyData() {}
~MyData() override {}
DISALLOW_COPY_AND_ASSIGN(MyData);
};
......
......@@ -27,16 +27,15 @@ class BASE_EXPORT DeferredSequencedTaskRunner : public SequencedTaskRunner {
const scoped_refptr<SequencedTaskRunner>& target_runner);
// TaskRunner implementation
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
const Closure& task,
TimeDelta delay) override;
virtual bool RunsTasksOnCurrentThread() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
const Closure& task,
TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
// SequencedTaskRunner implementation
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const Closure& task,
TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
const Closure& task,
TimeDelta delay) override;
// Start the execution - posts all queued tasks to the target executor. The
// deferred tasks are posted with their initial delay, meaning that the task
......@@ -56,7 +55,7 @@ class BASE_EXPORT DeferredSequencedTaskRunner : public SequencedTaskRunner {
bool is_non_nestable;
};
virtual ~DeferredSequencedTaskRunner();
~DeferredSequencedTaskRunner() override;
// Creates a |Task| object and adds it to |deferred_tasks_queue_|.
void QueueDeferredTask(const tracked_objects::Location& from_here,
......
......@@ -22,8 +22,7 @@ namespace {
class EnvironmentImpl : public base::Environment {
public:
virtual bool GetVar(const char* variable_name,
std::string* result) override {
bool GetVar(const char* variable_name, std::string* result) override {
if (GetVarImpl(variable_name, result))
return true;
......@@ -42,12 +41,12 @@ class EnvironmentImpl : public base::Environment {
return GetVarImpl(alternate_case_var.c_str(), result);
}
virtual bool SetVar(const char* variable_name,
const std::string& new_value) override {
bool SetVar(const char* variable_name,
const std::string& new_value) override {
return SetVarImpl(variable_name, new_value);
}
virtual bool UnSetVar(const char* variable_name) override {
bool UnSetVar(const char* variable_name) override {
return UnSetVarImpl(variable_name);
}
......
......@@ -19,26 +19,26 @@ class NSBundle;
class FileVersionInfoMac : public FileVersionInfo {
public:
explicit FileVersionInfoMac(NSBundle *bundle);
virtual ~FileVersionInfoMac();
~FileVersionInfoMac() override;
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
virtual base::string16 company_name() override;
virtual base::string16 company_short_name() override;
virtual base::string16 product_name() override;
virtual base::string16 product_short_name() override;
virtual base::string16 internal_name() override;
virtual base::string16 product_version() override;
virtual base::string16 private_build() override;
virtual base::string16 special_build() override;
virtual base::string16 comments() override;
virtual base::string16 original_filename() override;
virtual base::string16 file_description() override;
virtual base::string16 file_version() override;
virtual base::string16 legal_copyright() override;
virtual base::string16 legal_trademarks() override;
virtual base::string16 last_change() override;
virtual bool is_official_build() override;
base::string16 company_name() override;
base::string16 company_short_name() override;
base::string16 product_name() override;
base::string16 product_short_name() override;
base::string16 internal_name() override;
base::string16 product_version() override;
base::string16 private_build() override;
base::string16 special_build() override;
base::string16 comments() override;
base::string16 original_filename() override;
base::string16 file_description() override;
base::string16 file_version() override;
base::string16 legal_copyright() override;
base::string16 legal_trademarks() override;
base::string16 last_change() override;
bool is_official_build() override;
private:
// Returns a base::string16 value for a property name.
......
......@@ -111,9 +111,9 @@ class TestDelegate : public TestDelegateBase {
: collector_(collector) {
collector_->Register(this);
}
virtual ~TestDelegate() {}
~TestDelegate() override {}
virtual void OnFileChanged(const FilePath& path, bool error) override {
void OnFileChanged(const FilePath& path, bool error) override {
if (error)
ADD_FAILURE() << "Error " << path.value();
else
......@@ -272,9 +272,9 @@ class Deleter : public TestDelegateBase {
: watcher_(watcher),
loop_(loop) {
}
virtual ~Deleter() {}
~Deleter() override {}
virtual void OnFileChanged(const FilePath&, bool) override {
void OnFileChanged(const FilePath&, bool) override {
watcher_.reset();
loop_->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
}
......
......@@ -28,7 +28,7 @@ class FSEventsTaskRunner : public mac::LibDispatchTaskRunner {
}
protected:
virtual ~FSEventsTaskRunner() {}
~FSEventsTaskRunner() override {}
};
static LazyInstance<FSEventsTaskRunner>::Leaky g_task_runner =
......
......@@ -36,13 +36,13 @@ class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
bool ResolveTargetPath();
// FilePathWatcher::PlatformDelegate overrides.
virtual bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override;
virtual void Cancel() override;
bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override;
void Cancel() override;
private:
virtual ~FilePathWatcherFSEvents();
~FilePathWatcherFSEvents() override;
// Destroy the event stream.
void DestroyEventStream();
......@@ -51,7 +51,7 @@ class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
void StartEventStream(FSEventStreamEventId start_event);
// Cleans up and stops the event stream.
virtual void CancelOnMessageLoopThread() override;
void CancelOnMessageLoopThread() override;
// Callback to notify upon changes.
FilePathWatcher::Callback callback_;
......
......@@ -33,20 +33,20 @@ class FilePathWatcherKQueue : public FilePathWatcher::PlatformDelegate,
FilePathWatcherKQueue();
// MessageLoopForIO::Watcher overrides.
virtual void OnFileCanReadWithoutBlocking(int fd) override;
virtual void OnFileCanWriteWithoutBlocking(int fd) override;
void OnFileCanReadWithoutBlocking(int fd) override;
void OnFileCanWriteWithoutBlocking(int fd) override;
// MessageLoop::DestructionObserver overrides.
virtual void WillDestroyCurrentMessageLoop() override;
void WillDestroyCurrentMessageLoop() override;
// FilePathWatcher::PlatformDelegate overrides.
virtual bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override;
virtual void Cancel() override;
bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override;
void Cancel() override;
protected:
virtual ~FilePathWatcherKQueue();
~FilePathWatcherKQueue() override;
private:
class EventData {
......@@ -60,7 +60,7 @@ class FilePathWatcherKQueue : public FilePathWatcher::PlatformDelegate,
typedef std::vector<struct kevent> EventVector;
// Can only be called on |io_message_loop_|'s thread.
virtual void CancelOnMessageLoopThread() override;
void CancelOnMessageLoopThread() override;
// Returns true if the kevent values are error free.
bool AreKeventValuesValid(struct kevent* kevents, int count);
......
......@@ -15,9 +15,9 @@ namespace {
class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
public:
virtual bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override {
bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override {
// Use kqueue for non-recursive watches and FSEvents for recursive ones.
DCHECK(!impl_.get());
if (recursive) {
......@@ -33,20 +33,20 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
return impl_->Watch(path, recursive, callback);
}
virtual void Cancel() override {
void Cancel() override {
if (impl_.get())
impl_->Cancel();
set_cancelled();
}
virtual void CancelOnMessageLoopThread() override {
void CancelOnMessageLoopThread() override {
if (impl_.get())
impl_->Cancel();
set_cancelled();
}
protected:
virtual ~FilePathWatcherImpl() {}
~FilePathWatcherImpl() override {}
scoped_refptr<PlatformDelegate> impl_;
};
......
......@@ -33,7 +33,7 @@ class DataSerializer : public ImportantFileWriter::DataSerializer {
explicit DataSerializer(const std::string& data) : data_(data) {
}
virtual bool SerializeData(std::string* output) override {
bool SerializeData(std::string* output) override {
output->assign(data_);
return true;
}
......
......@@ -22,7 +22,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
: json_file_path_(json_file_path),
allow_trailing_comma_(false) {}
virtual ~JSONFileValueSerializer() {}
~JSONFileValueSerializer() override {}
// DO NOT USE except in unit tests to verify the file was written properly.
// We should never serialize directly to a file since this will block the
......@@ -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 base::Value& root) override;
bool Serialize(const base::Value& root) override;
// Equivalent to Serialize(root) except binary values are omitted from the
// output.
......@@ -45,8 +45,8 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// If |error_message| is non-null, it will be filled in with a formatted
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
virtual base::Value* Deserialize(int* error_code,
std::string* error_message) override;
base::Value* Deserialize(int* error_code,
std::string* error_message) override;
// This enum is designed to safely overlap with JSONReader::JsonParseError.
enum JsonFileError {
......
......@@ -37,7 +37,7 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
DictionaryValue::Swap(static_cast<DictionaryValue*>(root));
}
virtual void Swap(DictionaryValue* other) override {
void Swap(DictionaryValue* other) override {
DVLOG(1) << "Swap()ing a DictionaryValue inefficiently.";
// First deep copy to convert JSONStringValue to std::string and swap that
......@@ -55,8 +55,8 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
// Not overriding DictionaryValue::Remove because it just calls through to
// the method below.
virtual bool RemoveWithoutPathExpansion(const std::string& key,
scoped_ptr<Value>* out) override {
bool RemoveWithoutPathExpansion(const std::string& key,
scoped_ptr<Value>* out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return DictionaryValue::RemoveWithoutPathExpansion(key, out);
......@@ -87,7 +87,7 @@ class ListHiddenRootValue : public base::ListValue {
ListValue::Swap(static_cast<ListValue*>(root));