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 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 TryChromeDialogView::Result answer = TryChromeDialogView::Show( | 1452 TryChromeDialogView::Result answer = TryChromeDialogView::Show( |
1453 try_chrome_int, | 1453 try_chrome_int, |
1454 base::Bind(&ChromeProcessSingleton::SetActiveModalDialog, | 1454 base::Bind(&ChromeProcessSingleton::SetActiveModalDialog, |
1455 base::Unretained(process_singleton_.get()))); | 1455 base::Unretained(process_singleton_.get()))); |
1456 if (answer == TryChromeDialogView::NOT_NOW) | 1456 if (answer == TryChromeDialogView::NOT_NOW) |
1457 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; | 1457 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; |
1458 if (answer == TryChromeDialogView::UNINSTALL_CHROME) | 1458 if (answer == TryChromeDialogView::UNINSTALL_CHROME) |
1459 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; | 1459 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; |
1460 // At this point the user is willing to try chrome again. | 1460 // At this point the user is willing to try chrome again. |
1461 if (answer == TryChromeDialogView::TRY_CHROME_AS_DEFAULT) { | 1461 if (answer == TryChromeDialogView::TRY_CHROME_AS_DEFAULT) { |
1462 // Only set in the unattended case, the interactive case is Windows 8. | 1462 // Only set in the unattended case. This is not true on Windows 8+. |
1463 if (shell_integration::CanSetAsDefaultBrowser() == | 1463 if (shell_integration::GetDefaultWebClientSetPermission() == |
1464 shell_integration::SET_DEFAULT_UNATTENDED) | 1464 shell_integration::SET_DEFAULT_UNATTENDED) { |
1465 shell_integration::SetAsDefaultBrowser(); | 1465 shell_integration::SetAsDefaultBrowser(); |
| 1466 } |
1466 } | 1467 } |
1467 #else | 1468 #else |
1468 // We don't support retention experiments on Mac or Linux. | 1469 // We don't support retention experiments on Mac or Linux. |
1469 return content::RESULT_CODE_NORMAL_EXIT; | 1470 return content::RESULT_CODE_NORMAL_EXIT; |
1470 #endif // defined(OS_WIN) | 1471 #endif // defined(OS_WIN) |
1471 } | 1472 } |
1472 | 1473 |
1473 #if defined(OS_WIN) | 1474 #if defined(OS_WIN) |
1474 // Do the tasks if chrome has been upgraded while it was last running. | 1475 // Do the tasks if chrome has been upgraded while it was last running. |
1475 if (!already_running && upgrade_util::DoUpgradeTasks(parsed_command_line())) | 1476 if (!already_running && upgrade_util::DoUpgradeTasks(parsed_command_line())) |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 chromeos::CrosSettings::Shutdown(); | 1943 chromeos::CrosSettings::Shutdown(); |
1943 #endif // defined(OS_CHROMEOS) | 1944 #endif // defined(OS_CHROMEOS) |
1944 #endif // defined(OS_ANDROID) | 1945 #endif // defined(OS_ANDROID) |
1945 } | 1946 } |
1946 | 1947 |
1947 // Public members: | 1948 // Public members: |
1948 | 1949 |
1949 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1950 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1950 chrome_extra_parts_.push_back(parts); | 1951 chrome_extra_parts_.push_back(parts); |
1951 } | 1952 } |
OLD | NEW |