| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "apps/custom_launcher_page_contents.h" | 9 #include "apps/custom_launcher_page_contents.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } // namespace chrome | 86 } // namespace chrome |
| 87 | 87 |
| 88 namespace { | 88 namespace { |
| 89 | 89 |
| 90 const int kAutoLaunchDefaultTimeoutMilliSec = 50; | 90 const int kAutoLaunchDefaultTimeoutMilliSec = 50; |
| 91 | 91 |
| 92 #if defined(OS_WIN) | 92 #if defined(OS_WIN) |
| 93 void CreateShortcutInWebAppDir( | 93 void CreateShortcutInWebAppDir( |
| 94 const base::FilePath& app_data_dir, | 94 const base::FilePath& app_data_dir, |
| 95 base::Callback<void(const base::FilePath&)> callback, | 95 base::Callback<void(const base::FilePath&)> callback, |
| 96 const web_app::ShortcutInfo& info) { | 96 scoped_ptr<web_app::ShortcutInfo> info) { |
| 97 content::BrowserThread::PostTaskAndReplyWithResult( | 97 content::BrowserThread::PostTaskAndReplyWithResult( |
| 98 content::BrowserThread::FILE, | 98 content::BrowserThread::FILE, FROM_HERE, |
| 99 FROM_HERE, | 99 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, |
| 100 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, info), | 100 base::Passed(&info)), |
| 101 callback); | 101 callback); |
| 102 } | 102 } |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 void PopulateUsers(const ProfileInfoCache& profile_info, | 105 void PopulateUsers(const ProfileInfoCache& profile_info, |
| 106 const base::FilePath& active_profile_path, | 106 const base::FilePath& active_profile_path, |
| 107 app_list::AppListViewDelegate::Users* users) { | 107 app_list::AppListViewDelegate::Users* users) { |
| 108 users->clear(); | 108 users->clear(); |
| 109 const size_t count = profile_info.GetNumberOfProfiles(); | 109 const size_t count = profile_info.GetNumberOfProfiles(); |
| 110 for (size_t i = 0; i < count; ++i) { | 110 for (size_t i = 0; i < count; ++i) { |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 845 |
| 846 // SigninManagerFactory is not a leaky singleton (unlike this class), and | 846 // SigninManagerFactory is not a leaky singleton (unlike this class), and |
| 847 // its destructor will check that it has no remaining observers. | 847 // its destructor will check that it has no remaining observers. |
| 848 scoped_observer_.RemoveAll(); | 848 scoped_observer_.RemoveAll(); |
| 849 SigninManagerFactory::GetInstance()->RemoveObserver(this); | 849 SigninManagerFactory::GetInstance()->RemoveObserver(this); |
| 850 break; | 850 break; |
| 851 default: | 851 default: |
| 852 NOTREACHED(); | 852 NOTREACHED(); |
| 853 } | 853 } |
| 854 } | 854 } |
| OLD | NEW |