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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } // namespace chrome | 87 } // namespace chrome |
88 | 88 |
89 namespace { | 89 namespace { |
90 | 90 |
91 const int kAutoLaunchDefaultTimeoutMilliSec = 50; | 91 const int kAutoLaunchDefaultTimeoutMilliSec = 50; |
92 | 92 |
93 #if defined(OS_WIN) | 93 #if defined(OS_WIN) |
94 void CreateShortcutInWebAppDir( | 94 void CreateShortcutInWebAppDir( |
95 const base::FilePath& app_data_dir, | 95 const base::FilePath& app_data_dir, |
96 base::Callback<void(const base::FilePath&)> callback, | 96 base::Callback<void(const base::FilePath&)> callback, |
97 const web_app::ShortcutInfo& info) { | 97 scoped_ptr<web_app::ShortcutInfo> info) { |
98 content::BrowserThread::PostTaskAndReplyWithResult( | 98 content::BrowserThread::PostTaskAndReplyWithResult( |
99 content::BrowserThread::FILE, | 99 content::BrowserThread::FILE, FROM_HERE, |
100 FROM_HERE, | 100 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, |
101 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, info), | 101 base::Passed(&info)), |
102 callback); | 102 callback); |
103 } | 103 } |
104 #endif | 104 #endif |
105 | 105 |
106 void PopulateUsers(const ProfileInfoCache& profile_info, | 106 void PopulateUsers(const ProfileInfoCache& profile_info, |
107 const base::FilePath& active_profile_path, | 107 const base::FilePath& active_profile_path, |
108 app_list::AppListViewDelegate::Users* users) { | 108 app_list::AppListViewDelegate::Users* users) { |
109 users->clear(); | 109 users->clear(); |
110 const size_t count = profile_info.GetNumberOfProfiles(); | 110 const size_t count = profile_info.GetNumberOfProfiles(); |
111 for (size_t i = 0; i < count; ++i) { | 111 for (size_t i = 0; i < count; ++i) { |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 | 855 |
856 // SigninManagerFactory is not a leaky singleton (unlike this class), and | 856 // SigninManagerFactory is not a leaky singleton (unlike this class), and |
857 // its destructor will check that it has no remaining observers. | 857 // its destructor will check that it has no remaining observers. |
858 scoped_observer_.RemoveAll(); | 858 scoped_observer_.RemoveAll(); |
859 SigninManagerFactory::GetInstance()->RemoveObserver(this); | 859 SigninManagerFactory::GetInstance()->RemoveObserver(this); |
860 break; | 860 break; |
861 default: | 861 default: |
862 NOTREACHED(); | 862 NOTREACHED(); |
863 } | 863 } |
864 } | 864 } |
OLD | NEW |