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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for r184604=r184636 Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #include "chrome/browser/profiles/profile_manager.h" 87 #include "chrome/browser/profiles/profile_manager.h"
88 #include "chrome/browser/search_engines/search_engine_type.h" 88 #include "chrome/browser/search_engines/search_engine_type.h"
89 #include "chrome/browser/search_engines/template_url.h" 89 #include "chrome/browser/search_engines/template_url.h"
90 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 90 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
91 #include "chrome/browser/search_engines/template_url_service.h" 91 #include "chrome/browser/search_engines/template_url_service.h"
92 #include "chrome/browser/search_engines/template_url_service_factory.h" 92 #include "chrome/browser/search_engines/template_url_service_factory.h"
93 #include "chrome/browser/service/service_process_control.h" 93 #include "chrome/browser/service/service_process_control.h"
94 #include "chrome/browser/shell_integration.h" 94 #include "chrome/browser/shell_integration.h"
95 #include "chrome/browser/three_d_api_observer.h" 95 #include "chrome/browser/three_d_api_observer.h"
96 #include "chrome/browser/translate/translate_manager.h" 96 #include "chrome/browser/translate/translate_manager.h"
97 #include "chrome/browser/ui/app_list/app_list_util.h" 97 #include "chrome/browser/ui/app_list/app_list_service.h"
98 #include "chrome/browser/ui/browser.h" 98 #include "chrome/browser/ui/browser.h"
99 #include "chrome/browser/ui/browser_finder.h" 99 #include "chrome/browser/ui/browser_finder.h"
100 #include "chrome/browser/ui/host_desktop.h" 100 #include "chrome/browser/ui/host_desktop.h"
101 #include "chrome/browser/ui/startup/default_browser_prompt.h" 101 #include "chrome/browser/ui/startup/default_browser_prompt.h"
102 #include "chrome/browser/ui/startup/startup_browser_creator.h" 102 #include "chrome/browser/ui/startup/startup_browser_creator.h"
103 #include "chrome/browser/ui/uma_browsing_activity_observer.h" 103 #include "chrome/browser/ui/uma_browsing_activity_observer.h"
104 #include "chrome/browser/ui/user_data_dir_dialog.h" 104 #include "chrome/browser/ui/user_data_dir_dialog.h"
105 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 105 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
106 #include "chrome/common/child_process_logging.h" 106 #include "chrome/common/child_process_logging.h"
107 #include "chrome/common/chrome_constants.h" 107 #include "chrome/common/chrome_constants.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // Returns the path that contains the profile that should be loaded 335 // Returns the path that contains the profile that should be loaded
336 // on process startup. 336 // on process startup.
337 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, 337 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
338 const CommandLine& command_line) { 338 const CommandLine& command_line) {
339 if (command_line.HasSwitch(switches::kProfileDirectory)) { 339 if (command_line.HasSwitch(switches::kProfileDirectory)) {
340 return user_data_dir.Append( 340 return user_data_dir.Append(
341 command_line.GetSwitchValuePath(switches::kProfileDirectory)); 341 command_line.GetSwitchValuePath(switches::kProfileDirectory));
342 } 342 }
343 343
344 #if defined(ENABLE_APP_LIST)
345 // If we are showing the app list then chrome isn't shown so load the app 344 // If we are showing the app list then chrome isn't shown so load the app
346 // list's profile rather than chrome's. 345 // list's profile rather than chrome's.
347 if (command_line.HasSwitch(switches::kShowAppList)) 346 if (command_line.HasSwitch(switches::kShowAppList))
348 return chrome::GetAppListProfilePath(user_data_dir); 347 return AppListService::Get()->GetAppListProfilePath(user_data_dir);
349 #endif
350 348
351 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 349 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
352 user_data_dir); 350 user_data_dir);
353 } 351 }
354 352
355 // Initializes the profile, possibly doing some user prompting to pick a 353 // Initializes the profile, possibly doing some user prompting to pick a
356 // fallback profile. Returns the newly created profile, or NULL if startup 354 // fallback profile. Returns the newly created profile, or NULL if startup
357 // should not continue. 355 // should not continue.
358 Profile* CreateProfile(const content::MainFunctionParams& parameters, 356 Profile* CreateProfile(const content::MainFunctionParams& parameters,
359 const base::FilePath& user_data_dir, 357 const base::FilePath& user_data_dir,
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 if (base::win::GetVersion() <= base::win::VERSION_XP) 1798 if (base::win::GetVersion() <= base::win::VERSION_XP)
1801 uma_name += "_XP"; 1799 uma_name += "_XP";
1802 1800
1803 uma_name += "_PreRead_"; 1801 uma_name += "_PreRead_";
1804 uma_name += pre_read_percentage; 1802 uma_name += pre_read_percentage;
1805 AddPreReadHistogramTime(uma_name.c_str(), time); 1803 AddPreReadHistogramTime(uma_name.c_str(), time);
1806 } 1804 }
1807 #endif 1805 #endif
1808 #endif 1806 #endif
1809 } 1807 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698