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

Side by Side Diff: chrome/browser/profiles/profile_window.cc

Issue 654223009: Standardize usage of virtual/override/final in chrome/browser/profiles/ (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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class BrowserAddedForProfileObserver : public chrome::BrowserListObserver { 50 class BrowserAddedForProfileObserver : public chrome::BrowserListObserver {
51 public: 51 public:
52 BrowserAddedForProfileObserver( 52 BrowserAddedForProfileObserver(
53 Profile* profile, 53 Profile* profile,
54 ProfileManager::CreateCallback callback) 54 ProfileManager::CreateCallback callback)
55 : profile_(profile), 55 : profile_(profile),
56 callback_(callback) { 56 callback_(callback) {
57 DCHECK(!callback_.is_null()); 57 DCHECK(!callback_.is_null());
58 BrowserList::AddObserver(this); 58 BrowserList::AddObserver(this);
59 } 59 }
60 virtual ~BrowserAddedForProfileObserver() { 60 ~BrowserAddedForProfileObserver() override {}
61 }
62 61
63 private: 62 private:
64 // Overridden from BrowserListObserver: 63 // Overridden from BrowserListObserver:
65 virtual void OnBrowserAdded(Browser* browser) override { 64 void OnBrowserAdded(Browser* browser) override {
66 if (browser->profile() == profile_) { 65 if (browser->profile() == profile_) {
67 BrowserList::RemoveObserver(this); 66 BrowserList::RemoveObserver(this);
68 callback_.Run(profile_, Profile::CREATE_STATUS_INITIALIZED); 67 callback_.Run(profile_, Profile::CREATE_STATUS_INITIALIZED);
69 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 68 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
70 } 69 }
71 } 70 }
72 71
73 // Profile for which the browser should be opened. 72 // Profile for which the browser should be opened.
74 Profile* profile_; 73 Profile* profile_;
75 ProfileManager::CreateCallback callback_; 74 ProfileManager::CreateCallback callback_;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: 420 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR:
422 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 421 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
423 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; 422 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR;
424 return; 423 return;
425 default: 424 default:
426 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 425 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
427 } 426 }
428 } 427 }
429 428
430 } // namespace profiles 429 } // namespace profiles
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698