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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 | 1812 |
1813 RecordPreReadExperimentTime("Startup.BrowserOpenTabs", | 1813 RecordPreReadExperimentTime("Startup.BrowserOpenTabs", |
1814 base::TimeTicks::Now() - browser_open_start); | 1814 base::TimeTicks::Now() - browser_open_start); |
1815 | 1815 |
1816 // TODO(mad): Move this call in a proper place on CrOS. | 1816 // TODO(mad): Move this call in a proper place on CrOS. |
1817 // http://crosbug.com/17687 | 1817 // http://crosbug.com/17687 |
1818 #if !defined(OS_CHROMEOS) | 1818 #if !defined(OS_CHROMEOS) |
1819 // If we're running tests (ui_task is non-null), then we don't want to | 1819 // If we're running tests (ui_task is non-null), then we don't want to |
1820 // call FetchLanguageListFromTranslateServer | 1820 // call FetchLanguageListFromTranslateServer |
1821 if (parameters().ui_task == NULL && translate_manager_ != NULL) { | 1821 if (parameters().ui_task == NULL && translate_manager_ != NULL) { |
1822 // TODO(willchan): Get rid of this after TranslateManager doesn't use | |
1823 // the default request context. http://crbug.com/89396. | |
1824 // This is necessary to force |default_request_context_| to be | |
1825 // initialized. | |
1826 profile_->GetRequestContext(); | |
1827 translate_manager_->FetchLanguageListFromTranslateServer( | 1822 translate_manager_->FetchLanguageListFromTranslateServer( |
1828 profile_->GetPrefs()); | 1823 profile_->GetPrefs()); |
1829 } | 1824 } |
1830 #endif | 1825 #endif |
1831 | 1826 |
1832 run_message_loop_ = true; | 1827 run_message_loop_ = true; |
1833 } else { | 1828 } else { |
1834 run_message_loop_ = false; | 1829 run_message_loop_ = false; |
1835 } | 1830 } |
1836 } | 1831 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1962 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1968 uma_name += "_XP"; | 1963 uma_name += "_XP"; |
1969 | 1964 |
1970 uma_name += "_PreRead_"; | 1965 uma_name += "_PreRead_"; |
1971 uma_name += pre_read_percentage; | 1966 uma_name += pre_read_percentage; |
1972 AddPreReadHistogramTime(uma_name.c_str(), time); | 1967 AddPreReadHistogramTime(uma_name.c_str(), time); |
1973 } | 1968 } |
1974 #endif | 1969 #endif |
1975 #endif | 1970 #endif |
1976 } | 1971 } |
OLD | NEW |