| OLD | NEW |
| 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/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (!profile_) | 299 if (!profile_) |
| 300 return; | 300 return; |
| 301 | 301 |
| 302 #if defined(USE_ASH) | 302 #if defined(USE_ASH) |
| 303 // Don't populate the app list users if we are on the ash desktop. | 303 // Don't populate the app list users if we are on the ash desktop. |
| 304 return; | 304 return; |
| 305 #endif // USE_ASH | 305 #endif // USE_ASH |
| 306 | 306 |
| 307 // Populate the app list users. | 307 // Populate the app list users. |
| 308 PopulateUsers(profile_->GetPath(), &users_); | 308 PopulateUsers(profile_->GetPath(), &users_); |
| 309 | |
| 310 FOR_EACH_OBSERVER( | |
| 311 app_list::AppListViewDelegateObserver, observers_, OnProfilesChanged()); | |
| 312 } | 309 } |
| 313 | 310 |
| 314 void AppListViewDelegate::SetUpCustomLauncherPages() { | 311 void AppListViewDelegate::SetUpCustomLauncherPages() { |
| 315 std::vector<GURL> custom_launcher_page_urls; | 312 std::vector<GURL> custom_launcher_page_urls; |
| 316 GetCustomLauncherPageUrls(profile_, &custom_launcher_page_urls); | 313 GetCustomLauncherPageUrls(profile_, &custom_launcher_page_urls); |
| 317 if (custom_launcher_page_urls.empty()) | 314 if (custom_launcher_page_urls.empty()) |
| 318 return; | 315 return; |
| 319 | 316 |
| 320 for (std::vector<GURL>::const_iterator it = custom_launcher_page_urls.begin(); | 317 for (std::vector<GURL>::const_iterator it = custom_launcher_page_urls.begin(); |
| 321 it != custom_launcher_page_urls.end(); | 318 it != custom_launcher_page_urls.end(); |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 FOR_EACH_OBSERVER(app_list::AppListViewDelegateObserver, observers_, | 723 FOR_EACH_OBSERVER(app_list::AppListViewDelegateObserver, observers_, |
| 727 OnShutdown()); | 724 OnShutdown()); |
| 728 | 725 |
| 729 SetProfile(nullptr); // Ensures launcher page web contents are torn down. | 726 SetProfile(nullptr); // Ensures launcher page web contents are torn down. |
| 730 | 727 |
| 731 // SigninManagerFactory is not a leaky singleton (unlike this class), and | 728 // SigninManagerFactory is not a leaky singleton (unlike this class), and |
| 732 // its destructor will check that it has no remaining observers. | 729 // its destructor will check that it has no remaining observers. |
| 733 scoped_observer_.RemoveAll(); | 730 scoped_observer_.RemoveAll(); |
| 734 SigninManagerFactory::GetInstance()->RemoveObserver(this); | 731 SigninManagerFactory::GetInstance()->RemoveObserver(this); |
| 735 } | 732 } |
| OLD | NEW |