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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 ShellIntegration::SetAsDefaultBrowser(); | 1244 ShellIntegration::SetAsDefaultBrowser(); |
1245 } | 1245 } |
1246 #else | 1246 #else |
1247 // We don't support retention experiments on Mac or Linux. | 1247 // We don't support retention experiments on Mac or Linux. |
1248 return content::RESULT_CODE_NORMAL_EXIT; | 1248 return content::RESULT_CODE_NORMAL_EXIT; |
1249 #endif // defined(OS_WIN) | 1249 #endif // defined(OS_WIN) |
1250 } | 1250 } |
1251 | 1251 |
1252 // Profile creation ---------------------------------------------------------- | 1252 // Profile creation ---------------------------------------------------------- |
1253 | 1253 |
1254 // Called before CreateProfile because creating the profile can trigger | |
1255 // calls to GetDefaultProfile(). | |
1256 ProfileManager::AllowGetDefaultProfile(); | |
1257 | |
1258 MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE); | 1254 MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE); |
1259 profile_ = CreateProfile(parameters(), user_data_dir_, parsed_command_line()); | 1255 profile_ = CreateProfile(parameters(), user_data_dir_, parsed_command_line()); |
1260 if (!profile_) | 1256 if (!profile_) |
1261 return content::RESULT_CODE_NORMAL_EXIT; | 1257 return content::RESULT_CODE_NORMAL_EXIT; |
1262 | 1258 |
1263 #if defined(ENABLE_BACKGROUND) | 1259 #if defined(ENABLE_BACKGROUND) |
1264 // Autoload any profiles which are running background apps. | 1260 // Autoload any profiles which are running background apps. |
1265 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. | 1261 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. |
1266 browser_process_->profile_manager()->AutoloadProfiles(); | 1262 browser_process_->profile_manager()->AutoloadProfiles(); |
1267 #endif | 1263 #endif |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 chromeos::CrosSettings::Shutdown(); | 1695 chromeos::CrosSettings::Shutdown(); |
1700 #endif | 1696 #endif |
1701 #endif | 1697 #endif |
1702 } | 1698 } |
1703 | 1699 |
1704 // Public members: | 1700 // Public members: |
1705 | 1701 |
1706 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1702 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1707 chrome_extra_parts_.push_back(parts); | 1703 chrome_extra_parts_.push_back(parts); |
1708 } | 1704 } |
OLD | NEW |