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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 #include "net/http/http_stream_factory.h" | 115 #include "net/http/http_stream_factory.h" |
116 #include "net/socket/client_socket_pool_base.h" | 116 #include "net/socket/client_socket_pool_base.h" |
117 #include "net/socket/client_socket_pool_manager.h" | 117 #include "net/socket/client_socket_pool_manager.h" |
118 #include "net/spdy/spdy_session.h" | 118 #include "net/spdy/spdy_session.h" |
119 #include "net/spdy/spdy_session_pool.h" | 119 #include "net/spdy/spdy_session_pool.h" |
120 #include "net/url_request/url_request.h" | 120 #include "net/url_request/url_request.h" |
121 #include "net/url_request/url_request_throttler_manager.h" | 121 #include "net/url_request/url_request_throttler_manager.h" |
122 #include "net/websockets/websocket_job.h" | 122 #include "net/websockets/websocket_job.h" |
123 #include "ui/base/l10n/l10n_util.h" | 123 #include "ui/base/l10n/l10n_util.h" |
124 #include "ui/base/resource/resource_bundle.h" | 124 #include "ui/base/resource/resource_bundle.h" |
| 125 #include "ui/base/resource/resource_handle.h" |
125 | 126 |
126 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 127 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
127 #include "chrome/browser/first_run/upgrade_util_linux.h" | 128 #include "chrome/browser/first_run/upgrade_util_linux.h" |
128 #endif | 129 #endif |
129 | 130 |
130 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
131 #include "chrome/browser/chromeos/cros/cros_library.h" | 132 #include "chrome/browser/chromeos/cros/cros_library.h" |
132 #include "chrome/browser/chromeos/cros_settings.h" | 133 #include "chrome/browser/chromeos/cros_settings.h" |
133 #include "chrome/browser/chromeos/cros_settings_names.h" | 134 #include "chrome/browser/chromeos/cros_settings_names.h" |
134 #endif | 135 #endif |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 if (loaded_locale.empty() && | 1259 if (loaded_locale.empty() && |
1259 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { | 1260 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { |
1260 ShowMissingLocaleMessageBox(); | 1261 ShowMissingLocaleMessageBox(); |
1261 return chrome::RESULT_CODE_MISSING_DATA; | 1262 return chrome::RESULT_CODE_MISSING_DATA; |
1262 } | 1263 } |
1263 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; | 1264 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; |
1264 browser_process_->SetApplicationLocale(loaded_locale); | 1265 browser_process_->SetApplicationLocale(loaded_locale); |
1265 | 1266 |
1266 FilePath resources_pack_path; | 1267 FilePath resources_pack_path; |
1267 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 1268 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
1268 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path); | 1269 ResourceBundle::GetSharedInstance().AddDataPack( |
| 1270 resources_pack_path, ui::ResourceHandle::kScaleFactor1x); |
1269 #endif // defined(OS_MACOSX) | 1271 #endif // defined(OS_MACOSX) |
1270 } | 1272 } |
1271 | 1273 |
1272 #if defined(TOOLKIT_GTK) | 1274 #if defined(TOOLKIT_GTK) |
1273 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); | 1275 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); |
1274 #endif | 1276 #endif |
1275 | 1277 |
1276 std::string try_chrome = | 1278 std::string try_chrome = |
1277 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); | 1279 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); |
1278 if (!try_chrome.empty()) { | 1280 if (!try_chrome.empty()) { |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1981 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1980 uma_name += "_XP"; | 1982 uma_name += "_XP"; |
1981 | 1983 |
1982 uma_name += "_PreRead_"; | 1984 uma_name += "_PreRead_"; |
1983 uma_name += pre_read_percentage; | 1985 uma_name += pre_read_percentage; |
1984 AddPreReadHistogramTime(uma_name.c_str(), time); | 1986 AddPreReadHistogramTime(uma_name.c_str(), time); |
1985 } | 1987 } |
1986 #endif | 1988 #endif |
1987 #endif | 1989 #endif |
1988 } | 1990 } |
OLD | NEW |