Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "net/http/http_stream_factory.h" 116 #include "net/http/http_stream_factory.h"
117 #include "net/socket/client_socket_pool_base.h" 117 #include "net/socket/client_socket_pool_base.h"
118 #include "net/socket/client_socket_pool_manager.h" 118 #include "net/socket/client_socket_pool_manager.h"
119 #include "net/spdy/spdy_session.h" 119 #include "net/spdy/spdy_session.h"
120 #include "net/spdy/spdy_session_pool.h" 120 #include "net/spdy/spdy_session_pool.h"
121 #include "net/url_request/url_request.h" 121 #include "net/url_request/url_request.h"
122 #include "net/url_request/url_request_throttler_manager.h" 122 #include "net/url_request/url_request_throttler_manager.h"
123 #include "net/websockets/websocket_job.h" 123 #include "net/websockets/websocket_job.h"
124 #include "ui/base/l10n/l10n_util.h" 124 #include "ui/base/l10n/l10n_util.h"
125 #include "ui/base/resource/resource_bundle.h" 125 #include "ui/base/resource/resource_bundle.h"
126 #include "ui/base/resource/resource_handle.h"
126 127
127 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 128 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
128 #include "chrome/browser/first_run/upgrade_util_linux.h" 129 #include "chrome/browser/first_run/upgrade_util_linux.h"
129 #endif 130 #endif
130 131
131 #if defined(OS_CHROMEOS) 132 #if defined(OS_CHROMEOS)
132 #include "chrome/browser/chromeos/cros/cros_library.h" 133 #include "chrome/browser/chromeos/cros/cros_library.h"
133 #include "chrome/browser/chromeos/cros_settings.h" 134 #include "chrome/browser/chromeos/cros_settings.h"
134 #include "chrome/browser/chromeos/cros_settings_names.h" 135 #include "chrome/browser/chromeos/cros_settings_names.h"
135 #endif 136 #endif
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 if (loaded_locale.empty() && 1299 if (loaded_locale.empty() &&
1299 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { 1300 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) {
1300 ShowMissingLocaleMessageBox(); 1301 ShowMissingLocaleMessageBox();
1301 return chrome::RESULT_CODE_MISSING_DATA; 1302 return chrome::RESULT_CODE_MISSING_DATA;
1302 } 1303 }
1303 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; 1304 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
1304 browser_process_->SetApplicationLocale(loaded_locale); 1305 browser_process_->SetApplicationLocale(loaded_locale);
1305 1306
1306 FilePath resources_pack_path; 1307 FilePath resources_pack_path;
1307 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 1308 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
1308 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path); 1309 ResourceBundle::GetSharedInstance().AddDataPack(
1310 resources_pack_path, ui::ResourceHandle::kScaleFactor100x);
1309 #endif // defined(OS_MACOSX) 1311 #endif // defined(OS_MACOSX)
1310 } 1312 }
1311 1313
1312 #if defined(TOOLKIT_GTK) 1314 #if defined(TOOLKIT_GTK)
1313 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); 1315 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str());
1314 #endif 1316 #endif
1315 1317
1316 std::string try_chrome = 1318 std::string try_chrome =
1317 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); 1319 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain);
1318 if (!try_chrome.empty()) { 1320 if (!try_chrome.empty()) {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 if (base::win::GetVersion() <= base::win::VERSION_XP) 2021 if (base::win::GetVersion() <= base::win::VERSION_XP)
2020 uma_name += "_XP"; 2022 uma_name += "_XP";
2021 2023
2022 uma_name += "_PreRead_"; 2024 uma_name += "_PreRead_";
2023 uma_name += pre_read_percentage; 2025 uma_name += pre_read_percentage;
2024 AddPreReadHistogramTime(uma_name.c_str(), time); 2026 AddPreReadHistogramTime(uma_name.c_str(), time);
2025 } 2027 }
2026 #endif 2028 #endif
2027 #endif 2029 #endif
2028 } 2030 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698