| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 profile = GetStartupProfile(user_data_dir, parsed_command_line); | 436 profile = GetStartupProfile(user_data_dir, parsed_command_line); |
| 437 | 437 |
| 438 if (!profile && !profile_dir_specified) | 438 if (!profile && !profile_dir_specified) |
| 439 profile = GetFallbackStartupProfile(); | 439 profile = GetFallbackStartupProfile(); |
| 440 | 440 |
| 441 if (!profile) { | 441 if (!profile) { |
| 442 ProfileErrorType error_type = profile_dir_specified ? | 442 ProfileErrorType error_type = profile_dir_specified ? |
| 443 PROFILE_ERROR_CREATE_FAILURE_SPECIFIED : | 443 PROFILE_ERROR_CREATE_FAILURE_SPECIFIED : |
| 444 PROFILE_ERROR_CREATE_FAILURE_ALL; | 444 PROFILE_ERROR_CREATE_FAILURE_ALL; |
| 445 | 445 |
| 446 ShowProfileErrorDialog(error_type, IDS_COULDNT_STARTUP_PROFILE_ERROR); | 446 // TODO(lwchkg): What diagnostics do you want to include in the feedback |
| 447 // report when an error occurs? |
| 448 ShowProfileErrorDialog(error_type, |
| 449 IDS_COULDNT_STARTUP_PROFILE_ERROR, |
| 450 std::string()); |
| 447 return nullptr; | 451 return nullptr; |
| 448 } | 452 } |
| 449 #endif // defined(OS_CHROMEOS) || defined(OS_ANDROID) | 453 #endif // defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 450 | 454 |
| 451 UMA_HISTOGRAM_LONG_TIMES( | 455 UMA_HISTOGRAM_LONG_TIMES( |
| 452 "Startup.CreateFirstProfile", base::Time::Now() - start); | 456 "Startup.CreateFirstProfile", base::Time::Now() - start); |
| 453 return profile; | 457 return profile; |
| 454 } | 458 } |
| 455 | 459 |
| 456 #if defined(OS_MACOSX) | 460 #if defined(OS_MACOSX) |
| (...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 chromeos::CrosSettings::Shutdown(); | 2062 chromeos::CrosSettings::Shutdown(); |
| 2059 #endif // defined(OS_CHROMEOS) | 2063 #endif // defined(OS_CHROMEOS) |
| 2060 #endif // defined(OS_ANDROID) | 2064 #endif // defined(OS_ANDROID) |
| 2061 } | 2065 } |
| 2062 | 2066 |
| 2063 // Public members: | 2067 // Public members: |
| 2064 | 2068 |
| 2065 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2069 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2066 chrome_extra_parts_.push_back(parts); | 2070 chrome_extra_parts_.push_back(parts); |
| 2067 } | 2071 } |
| OLD | NEW |