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/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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile") | 329 TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile") |
330 base::Time start = base::Time::Now(); | 330 base::Time start = base::Time::Now(); |
331 if (profiles::IsMultipleProfilesEnabled() && | 331 if (profiles::IsMultipleProfilesEnabled() && |
332 parsed_command_line.HasSwitch(switches::kProfileDirectory)) { | 332 parsed_command_line.HasSwitch(switches::kProfileDirectory)) { |
333 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed, | 333 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed, |
334 parsed_command_line.GetSwitchValueASCII(switches::kProfileDirectory)); | 334 parsed_command_line.GetSwitchValueASCII(switches::kProfileDirectory)); |
335 // Clear kProfilesLastActive since the user only wants to launch a specific | 335 // Clear kProfilesLastActive since the user only wants to launch a specific |
336 // profile. | 336 // profile. |
337 ListPrefUpdate update(g_browser_process->local_state(), | 337 ListPrefUpdate update(g_browser_process->local_state(), |
338 prefs::kProfilesLastActive); | 338 prefs::kProfilesLastActive); |
339 ListValue* profile_list = update.Get(); | 339 base::ListValue* profile_list = update.Get(); |
340 profile_list->Clear(); | 340 profile_list->Clear(); |
341 } | 341 } |
342 | 342 |
343 Profile* profile = NULL; | 343 Profile* profile = NULL; |
344 #if defined(OS_CHROMEOS) | 344 #if defined(OS_CHROMEOS) |
345 // TODO(ivankr): http://crbug.com/83792 | 345 // TODO(ivankr): http://crbug.com/83792 |
346 profile = g_browser_process->profile_manager()->GetDefaultProfile( | 346 profile = g_browser_process->profile_manager()->GetDefaultProfile( |
347 user_data_dir); | 347 user_data_dir); |
348 #else | 348 #else |
349 base::FilePath profile_path = | 349 base::FilePath profile_path = |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 chromeos::CrosSettings::Shutdown(); | 1691 chromeos::CrosSettings::Shutdown(); |
1692 #endif | 1692 #endif |
1693 #endif | 1693 #endif |
1694 } | 1694 } |
1695 | 1695 |
1696 // Public members: | 1696 // Public members: |
1697 | 1697 |
1698 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1698 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1699 chrome_extra_parts_.push_back(parts); | 1699 chrome_extra_parts_.push_back(parts); |
1700 } | 1700 } |
OLD | NEW |