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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui_browsertest.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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 (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/ui/webui/options/options_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 namespace options { 49 namespace options {
50 50
51 namespace { 51 namespace {
52 52
53 class SignOutWaiter : public SigninManagerBase::Observer { 53 class SignOutWaiter : public SigninManagerBase::Observer {
54 public: 54 public:
55 explicit SignOutWaiter(SigninManagerBase* signin_manager) 55 explicit SignOutWaiter(SigninManagerBase* signin_manager)
56 : seen_(false), running_(false), scoped_observer_(this) { 56 : seen_(false), running_(false), scoped_observer_(this) {
57 scoped_observer_.Add(signin_manager); 57 scoped_observer_.Add(signin_manager);
58 } 58 }
59 virtual ~SignOutWaiter() {} 59 ~SignOutWaiter() override {}
60 60
61 void Wait() { 61 void Wait() {
62 if (seen_) 62 if (seen_)
63 return; 63 return;
64 64
65 running_ = true; 65 running_ = true;
66 message_loop_runner_ = new MessageLoopRunner; 66 message_loop_runner_ = new MessageLoopRunner;
67 message_loop_runner_->Run(); 67 message_loop_runner_->Run();
68 EXPECT_TRUE(seen_); 68 EXPECT_TRUE(seen_);
69 } 69 }
70 70
71 virtual void GoogleSignedOut(const std::string& account_id, 71 void GoogleSignedOut(const std::string& account_id,
72 const std::string& username) override { 72 const std::string& username) override {
73 seen_ = true; 73 seen_ = true;
74 if (!running_) 74 if (!running_)
75 return; 75 return;
76 76
77 message_loop_runner_->Quit(); 77 message_loop_runner_->Quit();
78 running_ = false; 78 running_ = false;
79 } 79 }
80 80
81 private: 81 private:
82 bool seen_; 82 bool seen_;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 run_loop.Run(); 331 run_loop.Run();
332 332
333 // Verify that the settings page has updated and lists two profiles. 333 // Verify that the settings page has updated and lists two profiles.
334 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( 334 ASSERT_TRUE(content::ExecuteScriptAndExtractInt(
335 contents, javascript, &profiles)); 335 contents, javascript, &profiles));
336 EXPECT_EQ(2, profiles); 336 EXPECT_EQ(2, profiles);
337 } 337 }
338 #endif 338 #endif
339 339
340 } // namespace options 340 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698