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 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 // Log the search engine chosen on first run. Do this at shutdown, after any | 1873 // Log the search engine chosen on first run. Do this at shutdown, after any |
1874 // changes are made from the first run bubble link, etc. | 1874 // changes are made from the first run bubble link, etc. |
1875 if (record_search_engine_) { | 1875 if (record_search_engine_) { |
1876 TemplateURLService* url_service = | 1876 TemplateURLService* url_service = |
1877 TemplateURLServiceFactory::GetForProfile(profile_); | 1877 TemplateURLServiceFactory::GetForProfile(profile_); |
1878 const TemplateURL* default_search_engine = | 1878 const TemplateURL* default_search_engine = |
1879 url_service->GetDefaultSearchProvider(); | 1879 url_service->GetDefaultSearchProvider(); |
1880 // The default engine can be NULL if the administrator has disabled | 1880 // The default engine can be NULL if the administrator has disabled |
1881 // default search. | 1881 // default search. |
1882 SearchEngineType search_engine_type = | 1882 SearchEngineType search_engine_type = |
1883 TemplateURLPrepopulateData::GetEngineType( | 1883 TemplateURLPrepopulateData::GetEngineType(default_search_engine ? |
1884 (default_search_engine && default_search_engine->url()) ? | 1884 default_search_engine->url() : std::string()); |
1885 default_search_engine->url()->url() : std::string()); | |
1886 // Record the search engine chosen. | 1885 // Record the search engine chosen. |
1887 UMA_HISTOGRAM_ENUMERATION("Chrome.SearchSelectExempt", search_engine_type, | 1886 UMA_HISTOGRAM_ENUMERATION("Chrome.SearchSelectExempt", search_engine_type, |
1888 SEARCH_ENGINE_MAX); | 1887 SEARCH_ENGINE_MAX); |
1889 } | 1888 } |
1890 #endif | 1889 #endif |
1891 | 1890 |
1892 // Some tests don't set parameters.ui_task, so they started translate | 1891 // Some tests don't set parameters.ui_task, so they started translate |
1893 // language fetch that was never completed so we need to cleanup here | 1892 // language fetch that was never completed so we need to cleanup here |
1894 // otherwise it will be done by the destructor in a wrong thread. | 1893 // otherwise it will be done by the destructor in a wrong thread. |
1895 if (parameters().ui_task == NULL && translate_manager_ != NULL) | 1894 if (parameters().ui_task == NULL && translate_manager_ != NULL) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1956 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1958 uma_name += "_XP"; | 1957 uma_name += "_XP"; |
1959 | 1958 |
1960 uma_name += "_PreRead_"; | 1959 uma_name += "_PreRead_"; |
1961 uma_name += pre_read_percentage; | 1960 uma_name += pre_read_percentage; |
1962 AddPreReadHistogramTime(uma_name.c_str(), time); | 1961 AddPreReadHistogramTime(uma_name.c_str(), time); |
1963 } | 1962 } |
1964 #endif | 1963 #endif |
1965 #endif | 1964 #endif |
1966 } | 1965 } |
OLD | NEW |