OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/app_controller_profile_observer.h" | |
6 | |
7 #import "chrome/browser/app_controller_mac.h" | |
8 #include "base/utf_string_conversions.h" | |
9 | |
10 AppControllerProfileObserver::AppControllerProfileObserver( | |
11 ProfileManager* profile_manager, id app_controller) | |
12 : profile_manager_(profile_manager), | |
13 app_controller_(app_controller) { | |
14 if (profile_manager_) { | |
Roger Tawa OOO till Jul 10th
2013/05/07 20:54:15
add DCHECK(profile_manager_) ?
noms (inactive)
2013/05/08 15:19:35
Done.
| |
15 profile_manager_->GetProfileInfoCache().AddObserver(this); | |
16 } | |
17 } | |
18 | |
19 AppControllerProfileObserver::~AppControllerProfileObserver() { | |
20 if (profile_manager_) { | |
21 profile_manager_->GetProfileInfoCache().RemoveObserver(this); | |
22 } | |
23 } | |
24 | |
25 // ProfileInfoCacheObserver implementation: | |
26 | |
27 void AppControllerProfileObserver::OnProfileAdded( | |
28 const base::FilePath& profile_path) { | |
29 } | |
30 | |
31 void AppControllerProfileObserver::OnProfileWasRemoved( | |
32 const base::FilePath& profile_path, | |
33 const string16& profile_name) { | |
34 // When a profile is deleted we need to notify the AppController, | |
35 // so that it can correctly update its pointer to the last used profile. | |
36 [app_controller_ profileWasRemoved:profile_name]; | |
37 } | |
38 | |
39 void AppControllerProfileObserver::OnProfileWillBeRemoved( | |
40 const base::FilePath& profile_path) { | |
41 } | |
42 | |
43 void AppControllerProfileObserver::OnProfileNameChanged( | |
44 const base::FilePath& profile_path, | |
45 const string16& old_profile_name) { | |
46 } | |
47 | |
48 void AppControllerProfileObserver::OnProfileAvatarChanged( | |
49 const base::FilePath& profile_path) { | |
50 } | |
51 | |
OLD | NEW |