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

Side by Side Diff: chrome/browser/task_manager/task_manager_unittest.cc

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 13 matching lines...) Expand all
24 // consistent with that. 24 // consistent with that.
25 const char* kZeroCPUUsage = "0.0"; 25 const char* kZeroCPUUsage = "0.0";
26 #else 26 #else
27 const char* kZeroCPUUsage = "0"; 27 const char* kZeroCPUUsage = "0";
28 #endif 28 #endif
29 29
30 class TestResource : public task_manager::Resource { 30 class TestResource : public task_manager::Resource {
31 public: 31 public:
32 TestResource() : refresh_called_(false) {} 32 TestResource() : refresh_called_(false) {}
33 33
34 virtual base::string16 GetTitle() const OVERRIDE { 34 virtual base::string16 GetTitle() const override {
35 return ASCIIToUTF16("test title"); 35 return ASCIIToUTF16("test title");
36 } 36 }
37 virtual base::string16 GetProfileName() const OVERRIDE { 37 virtual base::string16 GetProfileName() const override {
38 return ASCIIToUTF16("test profile"); 38 return ASCIIToUTF16("test profile");
39 } 39 }
40 virtual gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); } 40 virtual gfx::ImageSkia GetIcon() const override { return gfx::ImageSkia(); }
41 virtual base::ProcessHandle GetProcess() const OVERRIDE { 41 virtual base::ProcessHandle GetProcess() const override {
42 return base::GetCurrentProcessHandle(); 42 return base::GetCurrentProcessHandle();
43 } 43 }
44 virtual int GetUniqueChildProcessId() const OVERRIDE { 44 virtual int GetUniqueChildProcessId() const override {
45 // In reality the unique child process ID is not the actual process ID, 45 // In reality the unique child process ID is not the actual process ID,
46 // but for testing purposes it shouldn't make difference. 46 // but for testing purposes it shouldn't make difference.
47 return static_cast<int>(base::GetCurrentProcId()); 47 return static_cast<int>(base::GetCurrentProcId());
48 } 48 }
49 virtual Type GetType() const OVERRIDE { return RENDERER; } 49 virtual Type GetType() const override { return RENDERER; }
50 virtual bool SupportNetworkUsage() const OVERRIDE { return false; } 50 virtual bool SupportNetworkUsage() const override { return false; }
51 virtual void SetSupportNetworkUsage() OVERRIDE { NOTREACHED(); } 51 virtual void SetSupportNetworkUsage() override { NOTREACHED(); }
52 virtual void Refresh() OVERRIDE { refresh_called_ = true; } 52 virtual void Refresh() override { refresh_called_ = true; }
53 bool refresh_called() const { return refresh_called_; } 53 bool refresh_called() const { return refresh_called_; }
54 void set_refresh_called(bool refresh_called) { 54 void set_refresh_called(bool refresh_called) {
55 refresh_called_ = refresh_called; 55 refresh_called_ = refresh_called;
56 } 56 }
57 57
58 private: 58 private:
59 bool refresh_called_; 59 bool refresh_called_;
60 }; 60 };
61 61
62 } // namespace 62 } // namespace
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 TaskManagerModel* model = task_manager.model_.get(); 116 TaskManagerModel* model = task_manager.model_.get();
117 TestResource resource; 117 TestResource resource;
118 118
119 task_manager.AddResource(&resource); 119 task_manager.AddResource(&resource);
120 ASSERT_FALSE(resource.refresh_called()); 120 ASSERT_FALSE(resource.refresh_called());
121 model->update_state_ = TaskManagerModel::TASK_PENDING; 121 model->update_state_ = TaskManagerModel::TASK_PENDING;
122 model->Refresh(); 122 model->Refresh();
123 ASSERT_TRUE(resource.refresh_called()); 123 ASSERT_TRUE(resource.refresh_called());
124 task_manager.RemoveResource(&resource); 124 task_manager.RemoveResource(&resource);
125 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest_util.cc ('k') | chrome/browser/task_manager/web_contents_information.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698