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

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

Issue 11361051: Remove dependency on language detection library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 8 years, 1 month 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/chrome_browser.gypi » ('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 28 matching lines...) Expand all
39 #include "chrome/browser/chrome_browser_main_extra_parts.h" 39 #include "chrome/browser/chrome_browser_main_extra_parts.h"
40 #include "chrome/browser/chrome_gpu_util.h" 40 #include "chrome/browser/chrome_gpu_util.h"
41 #include "chrome/browser/defaults.h" 41 #include "chrome/browser/defaults.h"
42 #include "chrome/browser/extensions/extension_protocols.h" 42 #include "chrome/browser/extensions/extension_protocols.h"
43 #include "chrome/browser/extensions/extension_service.h" 43 #include "chrome/browser/extensions/extension_service.h"
44 #include "chrome/browser/extensions/startup_helper.h" 44 #include "chrome/browser/extensions/startup_helper.h"
45 #include "chrome/browser/first_run/upgrade_util.h" 45 #include "chrome/browser/first_run/upgrade_util.h"
46 #include "chrome/browser/google/google_search_counter.h" 46 #include "chrome/browser/google/google_search_counter.h"
47 #include "chrome/browser/google/google_util.h" 47 #include "chrome/browser/google/google_util.h"
48 #include "chrome/browser/jankometer.h" 48 #include "chrome/browser/jankometer.h"
49 #include "chrome/browser/language_usage_metrics.h"
50 #include "chrome/browser/managed_mode/managed_mode.h" 49 #include "chrome/browser/managed_mode/managed_mode.h"
51 #include "chrome/browser/metrics/field_trial_synchronizer.h" 50 #include "chrome/browser/metrics/field_trial_synchronizer.h"
52 #include "chrome/browser/metrics/metrics_log.h" 51 #include "chrome/browser/metrics/metrics_log.h"
53 #include "chrome/browser/metrics/metrics_service.h" 52 #include "chrome/browser/metrics/metrics_service.h"
54 #include "chrome/browser/metrics/thread_watcher.h" 53 #include "chrome/browser/metrics/thread_watcher.h"
55 #include "chrome/browser/metrics/tracking_synchronizer.h" 54 #include "chrome/browser/metrics/tracking_synchronizer.h"
56 #include "chrome/browser/metrics/variations/variations_service.h" 55 #include "chrome/browser/metrics/variations/variations_service.h"
57 #include "chrome/browser/nacl_host/nacl_process_host.h" 56 #include "chrome/browser/nacl_host/nacl_process_host.h"
58 #include "chrome/browser/net/chrome_net_log.h" 57 #include "chrome/browser/net/chrome_net_log.h"
59 #include "chrome/browser/notifications/desktop_notification_service.h" 58 #include "chrome/browser/notifications/desktop_notification_service.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 #include "net/http/http_stream_factory.h" 114 #include "net/http/http_stream_factory.h"
116 #include "net/spdy/spdy_session.h" 115 #include "net/spdy/spdy_session.h"
117 #include "net/spdy/spdy_session_pool.h" 116 #include "net/spdy/spdy_session_pool.h"
118 #include "net/url_request/url_request.h" 117 #include "net/url_request/url_request.h"
119 #include "net/websockets/websocket_job.h" 118 #include "net/websockets/websocket_job.h"
120 #include "ui/base/l10n/l10n_util.h" 119 #include "ui/base/l10n/l10n_util.h"
121 #include "ui/base/layout.h" 120 #include "ui/base/layout.h"
122 #include "ui/base/resource/resource_bundle.h" 121 #include "ui/base/resource/resource_bundle.h"
123 #include "ui/base/resource/resource_handle.h" 122 #include "ui/base/resource/resource_handle.h"
124 123
124 #if !defined(OS_ANDROID)
Nico 2012/11/02 15:23:26 Drive-by: Instead of gating this on OS_ANDROID, co
nilesh 2012/11/02 17:37:31 Done.
125 #include "chrome/browser/language_usage_metrics.h"
126 #endif
127
125 #if defined(OS_ANDROID) 128 #if defined(OS_ANDROID)
126 #include "base/android/build_info.h" 129 #include "base/android/build_info.h"
127 #endif 130 #endif
128 131
129 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 132 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
130 #include "chrome/browser/first_run/upgrade_util_linux.h" 133 #include "chrome/browser/first_run/upgrade_util_linux.h"
131 #endif 134 #endif
132 135
133 #if defined(OS_CHROMEOS) 136 #if defined(OS_CHROMEOS)
134 #include "chrome/browser/chromeos/cros/cros_library.h" 137 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { 1342 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) {
1340 FilePath path = 1343 FilePath path =
1341 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); 1344 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint);
1342 printing::PrintedDocument::set_debug_dump_path(path); 1345 printing::PrintedDocument::set_debug_dump_path(path);
1343 } 1346 }
1344 #endif 1347 #endif
1345 1348
1346 HandleTestParameters(parsed_command_line()); 1349 HandleTestParameters(parsed_command_line());
1347 RecordBreakpadStatusUMA(browser_process_->metrics_service()); 1350 RecordBreakpadStatusUMA(browser_process_->metrics_service());
1348 about_flags::RecordUMAStatistics(local_state_); 1351 about_flags::RecordUMAStatistics(local_state_);
1352 #if !defined(OS_ANDROID)
1353 // LanguageUsageMetrics needs third_party/cld/, which is excluded on Android.
1349 LanguageUsageMetrics::RecordAcceptLanguages( 1354 LanguageUsageMetrics::RecordAcceptLanguages(
1350 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); 1355 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
1351 LanguageUsageMetrics::RecordApplicationLanguage( 1356 LanguageUsageMetrics::RecordApplicationLanguage(
1352 browser_process_->GetApplicationLocale()); 1357 browser_process_->GetApplicationLocale());
1358 #endif
1353 1359
1354 // The extension service may be available at this point. If the command line 1360 // The extension service may be available at this point. If the command line
1355 // specifies --uninstall-extension, attempt the uninstall extension startup 1361 // specifies --uninstall-extension, attempt the uninstall extension startup
1356 // action. 1362 // action.
1357 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { 1363 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) {
1358 extensions::StartupHelper extension_startup_helper; 1364 extensions::StartupHelper extension_startup_helper;
1359 if (extension_startup_helper.UninstallExtension( 1365 if (extension_startup_helper.UninstallExtension(
1360 parsed_command_line(), profile_)) 1366 parsed_command_line(), profile_))
1361 return content::RESULT_CODE_NORMAL_EXIT; 1367 return content::RESULT_CODE_NORMAL_EXIT;
1362 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR; 1368 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 if (base::win::GetVersion() <= base::win::VERSION_XP) 1702 if (base::win::GetVersion() <= base::win::VERSION_XP)
1697 uma_name += "_XP"; 1703 uma_name += "_XP";
1698 1704
1699 uma_name += "_PreRead_"; 1705 uma_name += "_PreRead_";
1700 uma_name += pre_read_percentage; 1706 uma_name += pre_read_percentage;
1701 AddPreReadHistogramTime(uma_name.c_str(), time); 1707 AddPreReadHistogramTime(uma_name.c_str(), time);
1702 } 1708 }
1703 #endif 1709 #endif
1704 #endif 1710 #endif
1705 } 1711 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698