Chromium Code Reviews| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1356 return TryChromeDialogView::NOT_NOW; | 1356 return TryChromeDialogView::NOT_NOW; |
| 1357 } | 1357 } |
| 1358 int try_chrome_int; | 1358 int try_chrome_int; |
| 1359 base::StringToInt(try_chrome, &try_chrome_int); | 1359 base::StringToInt(try_chrome, &try_chrome_int); |
| 1360 TryChromeDialogView::Result answer = | 1360 TryChromeDialogView::Result answer = |
| 1361 TryChromeDialogView::Show(try_chrome_int, process_singleton_.get()); | 1361 TryChromeDialogView::Show(try_chrome_int, process_singleton_.get()); |
| 1362 if (answer == TryChromeDialogView::NOT_NOW) | 1362 if (answer == TryChromeDialogView::NOT_NOW) |
| 1363 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; | 1363 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; |
| 1364 if (answer == TryChromeDialogView::UNINSTALL_CHROME) | 1364 if (answer == TryChromeDialogView::UNINSTALL_CHROME) |
| 1365 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; | 1365 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; |
| 1366 // At this point the user is willing to try chrome again. | |
| 1367 if (answer == TryChromeDialogView::TRY_CHROME_AS_DEFAULT) { | |
| 1368 // Only set in the unatendeded case, the interactive case is Windows 8. | |
|
robertshield
2012/08/03 20:40:05
nit: unatendedededed -> unattended
| |
| 1369 if (ShellIntegration::CanSetAsDefaultBrowser() == | |
| 1370 ShellIntegration::SET_DEFAULT_UNATTENDED) | |
| 1371 ShellIntegration::SetAsDefaultBrowser(); | |
| 1372 } | |
| 1366 #else | 1373 #else |
| 1367 // We don't support retention experiments on Mac or Linux. | 1374 // We don't support retention experiments on Mac or Linux. |
| 1368 return content::RESULT_CODE_NORMAL_EXIT; | 1375 return content::RESULT_CODE_NORMAL_EXIT; |
| 1369 #endif // defined(OS_WIN) | 1376 #endif // defined(OS_WIN) |
| 1370 } | 1377 } |
| 1371 | 1378 |
| 1372 // On first run, we need to process the predictor preferences before the | 1379 // On first run, we need to process the predictor preferences before the |
| 1373 // browser's profile_manager object is created, but after ResourceBundle | 1380 // browser's profile_manager object is created, but after ResourceBundle |
| 1374 // is initialized. | 1381 // is initialized. |
| 1375 first_run_ui_bypass_ = false; // True to skip first run UI. | 1382 first_run_ui_bypass_ = false; // True to skip first run UI. |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2080 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2087 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 2081 uma_name += "_XP"; | 2088 uma_name += "_XP"; |
| 2082 | 2089 |
| 2083 uma_name += "_PreRead_"; | 2090 uma_name += "_PreRead_"; |
| 2084 uma_name += pre_read_percentage; | 2091 uma_name += pre_read_percentage; |
| 2085 AddPreReadHistogramTime(uma_name.c_str(), time); | 2092 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2086 } | 2093 } |
| 2087 #endif | 2094 #endif |
| 2088 #endif | 2095 #endif |
| 2089 } | 2096 } |
| OLD | NEW |