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 } | 1244 } |
1245 | 1245 |
1246 // Profile creation ---------------------------------------------------------- | 1246 // Profile creation ---------------------------------------------------------- |
1247 | 1247 |
1248 if (do_first_run_tasks_) { | 1248 if (do_first_run_tasks_) { |
1249 // Warn the ProfileManager that an import process will run, possibly | 1249 // Warn the ProfileManager that an import process will run, possibly |
1250 // locking the WebDataService directory of the next Profile created. | 1250 // locking the WebDataService directory of the next Profile created. |
1251 browser_process_->profile_manager()->SetWillImport(); | 1251 browser_process_->profile_manager()->SetWillImport(); |
1252 } | 1252 } |
1253 | 1253 |
| 1254 // Called before CreateProfile because creating the profile can trigger |
| 1255 // calls to GetDefaultProfile(). |
| 1256 ProfileManager::AllowGetDefaultProfile(); |
| 1257 |
1254 profile_ = CreateProfile(parameters(), user_data_dir_, parsed_command_line()); | 1258 profile_ = CreateProfile(parameters(), user_data_dir_, parsed_command_line()); |
1255 if (!profile_) | 1259 if (!profile_) |
1256 return content::RESULT_CODE_NORMAL_EXIT; | 1260 return content::RESULT_CODE_NORMAL_EXIT; |
1257 | 1261 |
1258 #if defined(ENABLE_BACKGROUND) | 1262 #if defined(ENABLE_BACKGROUND) |
1259 // Autoload any profiles which are running background apps. | 1263 // Autoload any profiles which are running background apps. |
1260 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. | 1264 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. |
1261 browser_process_->profile_manager()->AutoloadProfiles(); | 1265 browser_process_->profile_manager()->AutoloadProfiles(); |
1262 #endif | 1266 #endif |
1263 // Post-profile init --------------------------------------------------------- | 1267 // Post-profile init --------------------------------------------------------- |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1793 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1790 uma_name += "_XP"; | 1794 uma_name += "_XP"; |
1791 | 1795 |
1792 uma_name += "_PreRead_"; | 1796 uma_name += "_PreRead_"; |
1793 uma_name += pre_read_percentage; | 1797 uma_name += pre_read_percentage; |
1794 AddPreReadHistogramTime(uma_name.c_str(), time); | 1798 AddPreReadHistogramTime(uma_name.c_str(), time); |
1795 } | 1799 } |
1796 #endif | 1800 #endif |
1797 #endif | 1801 #endif |
1798 } | 1802 } |
OLD | NEW |