| 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 <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 // Handle special early return paths (which couldn't be processed even earlier | 1346 // Handle special early return paths (which couldn't be processed even earlier |
| 1347 // as they require the process singleton to be held) first. | 1347 // as they require the process singleton to be held) first. |
| 1348 | 1348 |
| 1349 std::string try_chrome = | 1349 std::string try_chrome = |
| 1350 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); | 1350 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); |
| 1351 if (!try_chrome.empty()) { | 1351 if (!try_chrome.empty()) { |
| 1352 #if defined(OS_WIN) | 1352 #if defined(OS_WIN) |
| 1353 // Setup.exe has determined that we need to run a retention experiment | 1353 // Setup.exe has determined that we need to run a retention experiment |
| 1354 // and has lauched chrome to show the experiment UI. It is guaranteed that | 1354 // and has lauched chrome to show the experiment UI. It is guaranteed that |
| 1355 // no other Chrome is currently running as the process singleton was | 1355 // no other Chrome is currently running as the process singleton was |
| 1356 // sucessfully grabbed above. | 1356 // successfully grabbed above. |
| 1357 int try_chrome_int; | 1357 int try_chrome_int; |
| 1358 base::StringToInt(try_chrome, &try_chrome_int); | 1358 base::StringToInt(try_chrome, &try_chrome_int); |
| 1359 TryChromeDialogView::Result answer = TryChromeDialogView::Show( | 1359 TryChromeDialogView::Result answer = TryChromeDialogView::Show( |
| 1360 try_chrome_int, | 1360 try_chrome_int, |
| 1361 base::Bind(&ChromeProcessSingleton::SetActiveModalDialog, | 1361 base::Bind(&ChromeProcessSingleton::SetActiveModalDialog, |
| 1362 base::Unretained(process_singleton_.get()))); | 1362 base::Unretained(process_singleton_.get()))); |
| 1363 if (answer == TryChromeDialogView::NOT_NOW) | 1363 if (answer == TryChromeDialogView::NOT_NOW) |
| 1364 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; | 1364 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; |
| 1365 if (answer == TryChromeDialogView::UNINSTALL_CHROME) | 1365 if (answer == TryChromeDialogView::UNINSTALL_CHROME) |
| 1366 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; | 1366 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 chromeos::CrosSettings::Shutdown(); | 1850 chromeos::CrosSettings::Shutdown(); |
| 1851 #endif // defined(OS_CHROMEOS) | 1851 #endif // defined(OS_CHROMEOS) |
| 1852 #endif // defined(OS_ANDROID) | 1852 #endif // defined(OS_ANDROID) |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 // Public members: | 1855 // Public members: |
| 1856 | 1856 |
| 1857 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1857 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1858 chrome_extra_parts_.push_back(parts); | 1858 chrome_extra_parts_.push_back(parts); |
| 1859 } | 1859 } |
| OLD | NEW |