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

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

Issue 18615010: Refactor utility methods out of the ProfileManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unbreak rebase and added new static fn from trunk Created 7 years, 5 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 (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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #include "chrome/browser/plugins/plugin_prefs.h" 81 #include "chrome/browser/plugins/plugin_prefs.h"
82 #include "chrome/browser/pref_service_flags_storage.h" 82 #include "chrome/browser/pref_service_flags_storage.h"
83 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 83 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
84 #include "chrome/browser/prefs/command_line_pref_store.h" 84 #include "chrome/browser/prefs/command_line_pref_store.h"
85 #include "chrome/browser/prefs/scoped_user_pref_update.h" 85 #include "chrome/browser/prefs/scoped_user_pref_update.h"
86 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 86 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
87 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 87 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
88 #include "chrome/browser/process_singleton.h" 88 #include "chrome/browser/process_singleton.h"
89 #include "chrome/browser/profiles/profile.h" 89 #include "chrome/browser/profiles/profile.h"
90 #include "chrome/browser/profiles/profile_manager.h" 90 #include "chrome/browser/profiles/profile_manager.h"
91 #include "chrome/browser/profiles/profiles_state.h"
91 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" 92 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h"
92 #include "chrome/browser/search_engines/search_engine_type.h" 93 #include "chrome/browser/search_engines/search_engine_type.h"
93 #include "chrome/browser/service/service_process_control.h" 94 #include "chrome/browser/service/service_process_control.h"
94 #include "chrome/browser/shell_integration.h" 95 #include "chrome/browser/shell_integration.h"
95 #include "chrome/browser/three_d_api_observer.h" 96 #include "chrome/browser/three_d_api_observer.h"
96 #include "chrome/browser/translate/translate_manager.h" 97 #include "chrome/browser/translate/translate_manager.h"
97 #include "chrome/browser/ui/app_list/app_list_service.h" 98 #include "chrome/browser/ui/app_list/app_list_service.h"
98 #include "chrome/browser/ui/browser.h" 99 #include "chrome/browser/ui/browser.h"
99 #include "chrome/browser/ui/browser_finder.h" 100 #include "chrome/browser/ui/browser_finder.h"
100 #include "chrome/browser/ui/host_desktop.h" 101 #include "chrome/browser/ui/host_desktop.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 user_data_dir); 323 user_data_dir);
323 } 324 }
324 325
325 // Initializes the profile, possibly doing some user prompting to pick a 326 // Initializes the profile, possibly doing some user prompting to pick a
326 // fallback profile. Returns the newly created profile, or NULL if startup 327 // fallback profile. Returns the newly created profile, or NULL if startup
327 // should not continue. 328 // should not continue.
328 Profile* CreateProfile(const content::MainFunctionParams& parameters, 329 Profile* CreateProfile(const content::MainFunctionParams& parameters,
329 const base::FilePath& user_data_dir, 330 const base::FilePath& user_data_dir,
330 const CommandLine& parsed_command_line) { 331 const CommandLine& parsed_command_line) {
331 TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile") 332 TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile")
332 if (ProfileManager::IsMultipleProfilesEnabled() && 333 if (profiles::IsMultipleProfilesEnabled() &&
333 parsed_command_line.HasSwitch(switches::kProfileDirectory)) { 334 parsed_command_line.HasSwitch(switches::kProfileDirectory)) {
334 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed, 335 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed,
335 parsed_command_line.GetSwitchValueASCII(switches::kProfileDirectory)); 336 parsed_command_line.GetSwitchValueASCII(switches::kProfileDirectory));
336 // Clear kProfilesLastActive since the user only wants to launch a specific 337 // Clear kProfilesLastActive since the user only wants to launch a specific
337 // profile. 338 // profile.
338 ListPrefUpdate update(g_browser_process->local_state(), 339 ListPrefUpdate update(g_browser_process->local_state(),
339 prefs::kProfilesLastActive); 340 prefs::kProfilesLastActive);
340 ListValue* profile_list = update.Get(); 341 ListValue* profile_list = update.Get();
341 profile_list->Clear(); 342 profile_list->Clear();
342 } 343 }
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 chromeos::CrosSettings::Shutdown(); 1740 chromeos::CrosSettings::Shutdown();
1740 #endif 1741 #endif
1741 #endif 1742 #endif
1742 } 1743 }
1743 1744
1744 // Public members: 1745 // Public members:
1745 1746
1746 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1747 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1747 chrome_extra_parts_.push_back(parts); 1748 chrome_extra_parts_.push_back(parts);
1748 } 1749 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials_desktop.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698