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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_impl.cc

Issue 14514003: Make OSX App Launcher Launchable from the Dock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase off cl14603002 Created 7 years, 7 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/app_list/app_list_service_impl.h" 5 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 Profile* profile = profile_manager->GetProfileByPath(profile_file_path); 153 Profile* profile = profile_manager->GetProfileByPath(profile_file_path);
154 154
155 if (!profile) { 155 if (!profile) {
156 LoadProfileAsync(profile_file_path); 156 LoadProfileAsync(profile_file_path);
157 return; 157 return;
158 } 158 }
159 159
160 ShowAppList(profile); 160 ShowAppList(profile);
161 } 161 }
162 162
163 void AppListServiceImpl::ShowForSavedProfile() {
164 SetAppListProfile(GetAppListProfilePath(
165 g_browser_process->profile_manager()->user_data_dir()));
166 }
167
163 Profile* AppListServiceImpl::GetCurrentAppListProfile() { 168 Profile* AppListServiceImpl::GetCurrentAppListProfile() {
164 return profile(); 169 return profile();
165 } 170 }
166 171
167 void AppListServiceImpl::SetProfile(Profile* new_profile) { 172 void AppListServiceImpl::SetProfile(Profile* new_profile) {
168 registrar_.RemoveAll(); 173 registrar_.RemoveAll();
169 profile_ = new_profile; 174 profile_ = new_profile;
170 if (!profile_) 175 if (!profile_)
171 return; 176 return;
172 177
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 keep_alive_.reset(NULL); 249 keep_alive_.reset(NULL);
245 } 250 }
246 251
247 AppListServiceImpl::ScopedKeepAlive::ScopedKeepAlive() { 252 AppListServiceImpl::ScopedKeepAlive::ScopedKeepAlive() {
248 chrome::StartKeepAlive(); 253 chrome::StartKeepAlive();
249 } 254 }
250 255
251 AppListServiceImpl::ScopedKeepAlive::~ScopedKeepAlive() { 256 AppListServiceImpl::ScopedKeepAlive::~ScopedKeepAlive() {
252 chrome::EndKeepAlive(); 257 chrome::EndKeepAlive();
253 } 258 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.h ('k') | chrome/browser/ui/app_list/app_list_service_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698