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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 #endif // defined(OS_WIN) | 816 #endif // defined(OS_WIN) |
817 } | 817 } |
818 | 818 |
819 // Android does first run in Java instead of native. | 819 // Android does first run in Java instead of native. |
820 #if !defined(OS_ANDROID) | 820 #if !defined(OS_ANDROID) |
821 // On first run, we need to process the predictor preferences before the | 821 // On first run, we need to process the predictor preferences before the |
822 // browser's profile_manager object is created, but after ResourceBundle | 822 // browser's profile_manager object is created, but after ResourceBundle |
823 // is initialized. | 823 // is initialized. |
824 first_run_ui_bypass_ = false; // True to skip first run UI. | 824 first_run_ui_bypass_ = false; // True to skip first run UI. |
825 if (is_first_run_) { | 825 if (is_first_run_) { |
826 first_run_ui_bypass_ = !first_run::ProcessMasterPreferences( | 826 first_run::ProcessMasterPreferencesResult pmp_result = |
827 user_data_dir_, master_prefs_.get()); | 827 first_run::ProcessMasterPreferences(user_data_dir_, |
| 828 master_prefs_.get()); |
| 829 if (pmp_result == first_run::EULA_EXIT_NOW) |
| 830 return chrome::RESULT_CODE_EULA_REFUSED; |
| 831 |
| 832 first_run_ui_bypass_ = (pmp_result == first_run::SKIP_FIRST_RUN); |
| 833 |
828 AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs); | 834 AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs); |
829 | 835 |
830 // If we are running in App mode, we do not want to show the importer | 836 // If we are running in App mode, we do not want to show the importer |
831 // (first run) UI. | 837 // (first run) UI. |
832 if (!first_run_ui_bypass_ && | 838 if (!first_run_ui_bypass_ && |
833 (parsed_command_line().HasSwitch(switches::kApp) || | 839 (parsed_command_line().HasSwitch(switches::kApp) || |
834 parsed_command_line().HasSwitch(switches::kAppId) || | 840 parsed_command_line().HasSwitch(switches::kAppId) || |
835 parsed_command_line().HasSwitch(switches::kNoFirstRun))) | 841 parsed_command_line().HasSwitch(switches::kNoFirstRun))) |
836 first_run_ui_bypass_ = true; | 842 first_run_ui_bypass_ = true; |
837 | 843 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1622 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1617 uma_name += "_XP"; | 1623 uma_name += "_XP"; |
1618 | 1624 |
1619 uma_name += "_PreRead_"; | 1625 uma_name += "_PreRead_"; |
1620 uma_name += pre_read_percentage; | 1626 uma_name += pre_read_percentage; |
1621 AddPreReadHistogramTime(uma_name.c_str(), time); | 1627 AddPreReadHistogramTime(uma_name.c_str(), time); |
1622 } | 1628 } |
1623 #endif | 1629 #endif |
1624 #endif | 1630 #endif |
1625 } | 1631 } |
OLD | NEW |