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

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

Issue 7348004: Record language usage as UMA histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK Created 9 years, 5 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/language_usage_metrics.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_main.h" 5 #include "chrome/browser/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 27 matching lines...) Expand all
38 #include "chrome/browser/browser_shutdown.h" 38 #include "chrome/browser/browser_shutdown.h"
39 #include "chrome/browser/chrome_content_browser_client.h" 39 #include "chrome/browser/chrome_content_browser_client.h"
40 #include "chrome/browser/defaults.h" 40 #include "chrome/browser/defaults.h"
41 #include "chrome/browser/extensions/extension_protocols.h" 41 #include "chrome/browser/extensions/extension_protocols.h"
42 #include "chrome/browser/extensions/extension_service.h" 42 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extensions_startup.h" 43 #include "chrome/browser/extensions/extensions_startup.h"
44 #include "chrome/browser/first_run/first_run.h" 44 #include "chrome/browser/first_run/first_run.h"
45 #include "chrome/browser/first_run/first_run_browser_process.h" 45 #include "chrome/browser/first_run/first_run_browser_process.h"
46 #include "chrome/browser/first_run/upgrade_util.h" 46 #include "chrome/browser/first_run/upgrade_util.h"
47 #include "chrome/browser/jankometer.h" 47 #include "chrome/browser/jankometer.h"
48 #include "chrome/browser/language_usage_metrics.h"
48 #include "chrome/browser/metrics/field_trial_synchronizer.h" 49 #include "chrome/browser/metrics/field_trial_synchronizer.h"
49 #include "chrome/browser/metrics/histogram_synchronizer.h" 50 #include "chrome/browser/metrics/histogram_synchronizer.h"
50 #include "chrome/browser/metrics/metrics_log.h" 51 #include "chrome/browser/metrics/metrics_log.h"
51 #include "chrome/browser/metrics/metrics_service.h" 52 #include "chrome/browser/metrics/metrics_service.h"
52 #include "chrome/browser/metrics/thread_watcher.h" 53 #include "chrome/browser/metrics/thread_watcher.h"
53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h"
54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" 55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h"
55 #include "chrome/browser/net/chrome_net_log.h" 56 #include "chrome/browser/net/chrome_net_log.h"
56 #include "chrome/browser/net/predictor_api.h" 57 #include "chrome/browser/net/predictor_api.h"
57 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 58 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 #endif 1867 #endif
1867 1868
1868 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2) 1869 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
1869 views::TouchFactory::GetInstance()->set_keep_mouse_cursor( 1870 views::TouchFactory::GetInstance()->set_keep_mouse_cursor(
1870 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepMouseCursor)); 1871 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepMouseCursor));
1871 #endif 1872 #endif
1872 1873
1873 HandleTestParameters(parsed_command_line); 1874 HandleTestParameters(parsed_command_line);
1874 RecordBreakpadStatusUMA(metrics); 1875 RecordBreakpadStatusUMA(metrics);
1875 about_flags::RecordUMAStatistics(local_state); 1876 about_flags::RecordUMAStatistics(local_state);
1877 LanguageUsageMetrics::RecordAcceptLanguages(
1878 profile->GetPrefs()->GetString(prefs::kAcceptLanguages));
1879 LanguageUsageMetrics::RecordApplicationLanguage(
1880 g_browser_process->GetApplicationLocale());
1876 1881
1877 #if defined(OS_CHROMEOS) 1882 #if defined(OS_CHROMEOS)
1878 metrics->StartExternalMetrics(); 1883 metrics->StartExternalMetrics();
1879 1884
1880 // Initialize the brightness observer so that we'll display an onscreen 1885 // Initialize the brightness observer so that we'll display an onscreen
1881 // indication of brightness changes during login. 1886 // indication of brightness changes during login.
1882 static chromeos::BrightnessObserver* brightness_observer = 1887 static chromeos::BrightnessObserver* brightness_observer =
1883 new chromeos::BrightnessObserver(); 1888 new chromeos::BrightnessObserver();
1884 chromeos::CrosLibrary::Get()->GetBrightnessLibrary()->AddObserver( 1889 chromeos::CrosLibrary::Get()->GetBrightnessLibrary()->AddObserver(
1885 brightness_observer); 1890 brightness_observer);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 #if defined(OS_CHROMEOS) 2082 #if defined(OS_CHROMEOS)
2078 // To be precise, logout (browser shutdown) is not yet done, but the 2083 // To be precise, logout (browser shutdown) is not yet done, but the
2079 // remaining work is negligible, hence we say LogoutDone here. 2084 // remaining work is negligible, hence we say LogoutDone here.
2080 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 2085 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
2081 false); 2086 false);
2082 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 2087 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
2083 #endif 2088 #endif
2084 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 2089 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
2085 return result_code; 2090 return result_code;
2086 } 2091 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/language_usage_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698