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

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

Issue 14301007: Android: Drop version extension for UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | no next file » | 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 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #include "net/base/net_module.h" 134 #include "net/base/net_module.h"
135 #include "net/base/sdch_manager.h" 135 #include "net/base/sdch_manager.h"
136 #include "net/cookies/cookie_monster.h" 136 #include "net/cookies/cookie_monster.h"
137 #include "net/http/http_network_layer.h" 137 #include "net/http/http_network_layer.h"
138 #include "net/http/http_stream_factory.h" 138 #include "net/http/http_stream_factory.h"
139 #include "net/url_request/url_request.h" 139 #include "net/url_request/url_request.h"
140 #include "ui/base/l10n/l10n_util.h" 140 #include "ui/base/l10n/l10n_util.h"
141 #include "ui/base/layout.h" 141 #include "ui/base/layout.h"
142 #include "ui/base/resource/resource_bundle.h" 142 #include "ui/base/resource/resource_bundle.h"
143 143
144 #if defined(OS_ANDROID)
145 #include "base/android/build_info.h"
146 #endif
147
148 #if !defined(OS_ANDROID) 144 #if !defined(OS_ANDROID)
149 #include "chrome/browser/ui/active_tab_tracker.h" 145 #include "chrome/browser/ui/active_tab_tracker.h"
150 #endif 146 #endif
151 147
152 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 148 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
153 #include "chrome/browser/first_run/upgrade_util_linux.h" 149 #include "chrome/browser/first_run/upgrade_util_linux.h"
154 #endif 150 #endif
155 151
156 #if defined(OS_CHROMEOS) 152 #if defined(OS_CHROMEOS)
157 #include "chrome/browser/chromeos/cros/cros_library.h" 153 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 // This will be called after the command-line has been mutated by about:flags 575 // This will be called after the command-line has been mutated by about:flags
580 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() { 576 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
581 // Must initialize metrics after labs have been converted into switches, 577 // Must initialize metrics after labs have been converted into switches,
582 // but before field trials are set up (so that client ID is available for 578 // but before field trials are set up (so that client ID is available for
583 // one-time randomized field trials). 579 // one-time randomized field trials).
584 #if defined(OS_WIN) 580 #if defined(OS_WIN)
585 if (parsed_command_line_.HasSwitch(switches::kChromeFrame)) 581 if (parsed_command_line_.HasSwitch(switches::kChromeFrame))
586 MetricsLog::set_version_extension("-F"); 582 MetricsLog::set_version_extension("-F");
587 #elif defined(ARCH_CPU_64_BITS) 583 #elif defined(ARCH_CPU_64_BITS)
588 MetricsLog::set_version_extension("-64"); 584 MetricsLog::set_version_extension("-64");
589 #elif defined(OS_ANDROID)
590 // Set version extension to identify Android releases.
591 // Example: 16.0.912.61-K88
592 std::string version_extension = "-K";
593 version_extension.append(
594 base::android::BuildInfo::GetInstance()->package_version_code());
595 MetricsLog::set_version_extension(version_extension);
596 #endif // defined(OS_WIN) 585 #endif // defined(OS_WIN)
597 586
598 // Initialize FieldTrialList to support FieldTrials that use one-time 587 // Initialize FieldTrialList to support FieldTrials that use one-time
599 // randomization. 588 // randomization.
600 MetricsService* metrics = browser_process_->metrics_service(); 589 MetricsService* metrics = browser_process_->metrics_service();
601 bool metrics_reporting_enabled = IsMetricsReportingEnabled(); 590 bool metrics_reporting_enabled = IsMetricsReportingEnabled();
602 if (metrics_reporting_enabled) 591 if (metrics_reporting_enabled)
603 metrics->ForceClientIdCreation(); // Needed below. 592 metrics->ForceClientIdCreation(); // Needed below.
604 field_trial_list_.reset( 593 field_trial_list_.reset(
605 new base::FieldTrialList( 594 new base::FieldTrialList(
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 if (base::win::GetVersion() <= base::win::VERSION_XP) 1735 if (base::win::GetVersion() <= base::win::VERSION_XP)
1747 uma_name += "_XP"; 1736 uma_name += "_XP";
1748 1737
1749 uma_name += "_PreRead_"; 1738 uma_name += "_PreRead_";
1750 uma_name += pre_read_percentage; 1739 uma_name += pre_read_percentage;
1751 AddPreReadHistogramTime(uma_name.c_str(), time); 1740 AddPreReadHistogramTime(uma_name.c_str(), time);
1752 } 1741 }
1753 #endif 1742 #endif
1754 #endif 1743 #endif
1755 } 1744 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698