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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 857433003: Update {virtual,override,final} to follow C++11 style chrome/browser/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase Created 5 years, 11 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/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 : controller_(controller) { 279 : controller_(controller) {
280 DCHECK(user_manager::UserManager::IsInitialized()); 280 DCHECK(user_manager::UserManager::IsInitialized());
281 user_manager::UserManager::Get()->AddSessionStateObserver(this); 281 user_manager::UserManager::Get()->AddSessionStateObserver(this);
282 // A UserAddedToSession notification can be sent before a profile is loaded. 282 // A UserAddedToSession notification can be sent before a profile is loaded.
283 // Since our observers require that we have already a profile, we might have 283 // Since our observers require that we have already a profile, we might have
284 // to postpone the notification until the ProfileManager lets us know that 284 // to postpone the notification until the ProfileManager lets us know that
285 // the profile for that newly added user was added to the ProfileManager. 285 // the profile for that newly added user was added to the ProfileManager.
286 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, 286 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED,
287 content::NotificationService::AllSources()); 287 content::NotificationService::AllSources());
288 } 288 }
289 virtual ~ChromeLauncherControllerUserSwitchObserverChromeOS() { 289 ~ChromeLauncherControllerUserSwitchObserverChromeOS() override {
290 user_manager::UserManager::Get()->RemoveSessionStateObserver(this); 290 user_manager::UserManager::Get()->RemoveSessionStateObserver(this);
291 } 291 }
292 292
293 // user_manager::UserManager::UserSessionStateObserver overrides: 293 // user_manager::UserManager::UserSessionStateObserver overrides:
294 virtual void UserAddedToSession( 294 void UserAddedToSession(const user_manager::User* added_user) override;
295 const user_manager::User* added_user) override;
296 295
297 // content::NotificationObserver overrides: 296 // content::NotificationObserver overrides:
298 virtual void Observe(int type, 297 void Observe(int type,
299 const content::NotificationSource& source, 298 const content::NotificationSource& source,
300 const content::NotificationDetails& details) override; 299 const content::NotificationDetails& details) override;
301 300
302 private: 301 private:
303 // Add a user to the session. 302 // Add a user to the session.
304 void AddUser(Profile* profile); 303 void AddUser(Profile* profile);
305 304
306 // The owning ChromeLauncherController. 305 // The owning ChromeLauncherController.
307 ChromeLauncherController* controller_; 306 ChromeLauncherController* controller_;
308 307
(...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 void ChromeLauncherController::ReleaseProfile() { 2127 void ChromeLauncherController::ReleaseProfile() {
2129 if (app_sync_ui_state_) 2128 if (app_sync_ui_state_)
2130 app_sync_ui_state_->RemoveObserver(this); 2129 app_sync_ui_state_->RemoveObserver(this);
2131 2130
2132 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); 2131 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this);
2133 2132
2134 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); 2133 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this);
2135 2134
2136 pref_change_registrar_.RemoveAll(); 2135 pref_change_registrar_.RemoveAll();
2137 } 2136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698