| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // profile. | 420 // profile. |
| 421 ListPrefUpdate update(g_browser_process->local_state(), | 421 ListPrefUpdate update(g_browser_process->local_state(), |
| 422 prefs::kProfilesLastActive); | 422 prefs::kProfilesLastActive); |
| 423 base::ListValue* profile_list = update.Get(); | 423 base::ListValue* profile_list = update.Get(); |
| 424 profile_list->Clear(); | 424 profile_list->Clear(); |
| 425 } | 425 } |
| 426 | 426 |
| 427 Profile* profile = nullptr; | 427 Profile* profile = nullptr; |
| 428 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 428 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 429 // On ChromeOS and Android the ProfileManager will use the same path as the | 429 // On ChromeOS and Android the ProfileManager will use the same path as the |
| 430 // one we got passed. GetActiveUserProfile will therefore use the correct path | 430 // one we got passed. CreateInitialProfile will therefore use the correct path |
| 431 // automatically. | 431 // automatically. |
| 432 DCHECK_EQ(user_data_dir.value(), | 432 DCHECK_EQ(user_data_dir.value(), |
| 433 g_browser_process->profile_manager()->user_data_dir().value()); | 433 g_browser_process->profile_manager()->user_data_dir().value()); |
| 434 profile = ProfileManager::GetActiveUserProfile(); | 434 profile = ProfileManager::CreateInitialProfile(); |
| 435 | 435 |
| 436 // TODO(port): fix this. See comments near the definition of |user_data_dir|. | 436 // TODO(port): fix this. See comments near the definition of |user_data_dir|. |
| 437 // It is better to CHECK-fail here than it is to silently exit because of | 437 // It is better to CHECK-fail here than it is to silently exit because of |
| 438 // missing code in the above test. | 438 // missing code in the above test. |
| 439 CHECK(profile) << "Cannot get default profile."; | 439 CHECK(profile) << "Cannot get default profile."; |
| 440 | 440 |
| 441 #else | 441 #else |
| 442 profile = GetStartupProfile(user_data_dir, parsed_command_line); | 442 profile = GetStartupProfile(user_data_dir, parsed_command_line); |
| 443 | 443 |
| 444 if (!profile && !profile_dir_specified) | 444 if (!profile && !profile_dir_specified) |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 chromeos::CrosSettings::Shutdown(); | 2063 chromeos::CrosSettings::Shutdown(); |
| 2064 #endif // defined(OS_CHROMEOS) | 2064 #endif // defined(OS_CHROMEOS) |
| 2065 #endif // defined(OS_ANDROID) | 2065 #endif // defined(OS_ANDROID) |
| 2066 } | 2066 } |
| 2067 | 2067 |
| 2068 // Public members: | 2068 // Public members: |
| 2069 | 2069 |
| 2070 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2070 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2071 chrome_extra_parts_.push_back(parts); | 2071 chrome_extra_parts_.push_back(parts); |
| 2072 } | 2072 } |
| OLD | NEW |