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

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

Issue 744483002: Setting --enable-gpu-benchmarking should force all Finch trials to default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fix Created 6 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
« 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 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "base/strings/string_number_conversions.h" 30 #include "base/strings/string_number_conversions.h"
31 #include "base/strings/string_piece.h" 31 #include "base/strings/string_piece.h"
32 #include "base/strings/string_split.h" 32 #include "base/strings/string_split.h"
33 #include "base/strings/sys_string_conversions.h" 33 #include "base/strings/sys_string_conversions.h"
34 #include "base/strings/utf_string_conversions.h" 34 #include "base/strings/utf_string_conversions.h"
35 #include "base/sys_info.h" 35 #include "base/sys_info.h"
36 #include "base/threading/platform_thread.h" 36 #include "base/threading/platform_thread.h"
37 #include "base/time/time.h" 37 #include "base/time/time.h"
38 #include "base/values.h" 38 #include "base/values.h"
39 #include "build/build_config.h" 39 #include "build/build_config.h"
40 #include "cc/base/switches.h"
40 #include "chrome/browser/about_flags.h" 41 #include "chrome/browser/about_flags.h"
41 #include "chrome/browser/browser_process.h" 42 #include "chrome/browser/browser_process.h"
42 #include "chrome/browser/browser_process_impl.h" 43 #include "chrome/browser/browser_process_impl.h"
43 #include "chrome/browser/browser_process_platform_part.h" 44 #include "chrome/browser/browser_process_platform_part.h"
44 #include "chrome/browser/browser_shutdown.h" 45 #include "chrome/browser/browser_shutdown.h"
45 #include "chrome/browser/chrome_browser_main_extra_parts.h" 46 #include "chrome/browser/chrome_browser_main_extra_parts.h"
46 #include "chrome/browser/component_updater/cld_component_installer.h" 47 #include "chrome/browser/component_updater/cld_component_installer.h"
47 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" 48 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
48 #include "chrome/browser/component_updater/flash_component_installer.h" 49 #include "chrome/browser/component_updater/flash_component_installer.h"
49 #include "chrome/browser/component_updater/recovery_component_installer.h" 50 #include "chrome/browser/component_updater/recovery_component_installer.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // but before field trials are set up (so that client ID is available for 595 // but before field trials are set up (so that client ID is available for
595 // one-time randomized field trials). 596 // one-time randomized field trials).
596 597
597 // Initialize FieldTrialList to support FieldTrials that use one-time 598 // Initialize FieldTrialList to support FieldTrials that use one-time
598 // randomization. 599 // randomization.
599 metrics::MetricsService* metrics = browser_process_->metrics_service(); 600 metrics::MetricsService* metrics = browser_process_->metrics_service();
600 field_trial_list_.reset( 601 field_trial_list_.reset(
601 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); 602 new base::FieldTrialList(metrics->CreateEntropyProvider().release()));
602 603
603 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 604 const CommandLine* command_line = CommandLine::ForCurrentProcess();
604 if (command_line->HasSwitch(switches::kEnableBenchmarking)) 605 if (command_line->HasSwitch(switches::kEnableBenchmarking) ||
606 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)) {
605 base::FieldTrial::EnableBenchmarking(); 607 base::FieldTrial::EnableBenchmarking();
608 }
606 609
607 // Ensure any field trials specified on the command line are initialized. 610 // Ensure any field trials specified on the command line are initialized.
608 if (command_line->HasSwitch(switches::kForceFieldTrials)) { 611 if (command_line->HasSwitch(switches::kForceFieldTrials)) {
609 std::set<std::string> unforceable_field_trials; 612 std::set<std::string> unforceable_field_trials;
610 #if defined(OFFICIAL_BUILD) 613 #if defined(OFFICIAL_BUILD)
611 unforceable_field_trials.insert("SettingsEnforcement"); 614 unforceable_field_trials.insert("SettingsEnforcement");
612 #endif // defined(OFFICIAL_BUILD) 615 #endif // defined(OFFICIAL_BUILD)
613 616
614 // Create field trials without activating them, so that this behaves in a 617 // Create field trials without activating them, so that this behaves in a
615 // consistent manner with field trials created from the server. 618 // consistent manner with field trials created from the server.
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 chromeos::CrosSettings::Shutdown(); 1719 chromeos::CrosSettings::Shutdown();
1717 #endif 1720 #endif
1718 #endif 1721 #endif
1719 } 1722 }
1720 1723
1721 // Public members: 1724 // Public members:
1722 1725
1723 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1726 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1724 chrome_extra_parts_.push_back(parts); 1727 chrome_extra_parts_.push_back(parts);
1725 } 1728 }
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