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

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

Issue 253203002: Log operator code histogram on new metric log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api_move
Patch Set: sync'ed to head, added test. Created 6 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
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 24 matching lines...) Expand all
35 #include "base/threading/platform_thread.h" 35 #include "base/threading/platform_thread.h"
36 #include "base/time/time.h" 36 #include "base/time/time.h"
37 #include "base/values.h" 37 #include "base/values.h"
38 #include "build/build_config.h" 38 #include "build/build_config.h"
39 #include "chrome/browser/about_flags.h" 39 #include "chrome/browser/about_flags.h"
40 #include "chrome/browser/browser_process.h" 40 #include "chrome/browser/browser_process.h"
41 #include "chrome/browser/browser_process_impl.h" 41 #include "chrome/browser/browser_process_impl.h"
42 #include "chrome/browser/browser_process_platform_part.h" 42 #include "chrome/browser/browser_process_platform_part.h"
43 #include "chrome/browser/browser_shutdown.h" 43 #include "chrome/browser/browser_shutdown.h"
44 #include "chrome/browser/chrome_browser_main_extra_parts.h" 44 #include "chrome/browser/chrome_browser_main_extra_parts.h"
45 #include "chrome/browser/chrome_browser_metrics_log_observer.h"
45 #include "chrome/browser/component_updater/cld_component_installer.h" 46 #include "chrome/browser/component_updater/cld_component_installer.h"
46 #include "chrome/browser/component_updater/component_updater_service.h" 47 #include "chrome/browser/component_updater/component_updater_service.h"
47 #include "chrome/browser/component_updater/flash_component_installer.h" 48 #include "chrome/browser/component_updater/flash_component_installer.h"
48 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" 49 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
49 #include "chrome/browser/component_updater/recovery_component_installer.h" 50 #include "chrome/browser/component_updater/recovery_component_installer.h"
50 #include "chrome/browser/component_updater/swiftshader_component_installer.h" 51 #include "chrome/browser/component_updater/swiftshader_component_installer.h"
51 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 52 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
52 #include "chrome/browser/defaults.h" 53 #include "chrome/browser/defaults.h"
53 #include "chrome/browser/extensions/extension_service.h" 54 #include "chrome/browser/extensions/extension_service.h"
54 #include "chrome/browser/extensions/startup_helper.h" 55 #include "chrome/browser/extensions/startup_helper.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 // This will be called after the command-line has been mutated by about:flags 553 // This will be called after the command-line has been mutated by about:flags
553 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() { 554 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
554 TRACE_EVENT0("startup", "ChromeBrowserMainParts::SetupMetricsAndFieldTrials"); 555 TRACE_EVENT0("startup", "ChromeBrowserMainParts::SetupMetricsAndFieldTrials");
555 // Must initialize metrics after labs have been converted into switches, 556 // Must initialize metrics after labs have been converted into switches,
556 // but before field trials are set up (so that client ID is available for 557 // but before field trials are set up (so that client ID is available for
557 // one-time randomized field trials). 558 // one-time randomized field trials).
558 #if defined(ARCH_CPU_64_BITS) 559 #if defined(ARCH_CPU_64_BITS)
559 MetricsLog::set_version_extension("-64"); 560 MetricsLog::set_version_extension("-64");
560 #endif // defined(ARCH_CPU_64_BITS) 561 #endif // defined(ARCH_CPU_64_BITS)
561 562
563 MetricsService* metrics = browser_process_->metrics_service();
564 // Create the metrics log observer.
565 browser_metrics_log_observer_.reset(new ChromeBrowserMetricsLogObserver());
Ilya Sherman 2014/05/07 01:03:16 I am not an owner for this code, but modifying chr
bolian 2014/05/07 02:20:26 This is not resolved yet. It is here to make sure
bolian 2014/05/07 18:11:44 I explored this more. //net still does not look li
Ilya Sherman 2014/05/07 23:57:40 I still think this is unlikely to be the correct l
bolian 2014/05/08 00:54:51 I keep remind myself that MetricsServiceObserver h
Ilya Sherman 2014/05/08 01:10:11 Perhaps there was some miscommunication. I don't
bolian 2014/05/08 01:29:58 We have abstracted it to be an observer to Metrics
Ilya Sherman 2014/05/08 03:09:40 Hmm, I think I understand your concern: You don't
562 // Initialize FieldTrialList to support FieldTrials that use one-time 566 // Initialize FieldTrialList to support FieldTrials that use one-time
563 // randomization. 567 // randomization.
564 MetricsService* metrics = browser_process_->metrics_service();
565 field_trial_list_.reset( 568 field_trial_list_.reset(
566 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); 569 new base::FieldTrialList(metrics->CreateEntropyProvider().release()));
567 570
568 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 571 const CommandLine* command_line = CommandLine::ForCurrentProcess();
569 if (command_line->HasSwitch(switches::kEnableBenchmarking)) 572 if (command_line->HasSwitch(switches::kEnableBenchmarking))
570 base::FieldTrial::EnableBenchmarking(); 573 base::FieldTrial::EnableBenchmarking();
571 574
572 // Ensure any field trials specified on the command line are initialized. 575 // Ensure any field trials specified on the command line are initialized.
573 // Also stop the metrics service so that we don't pollute UMA. 576 // Also stop the metrics service so that we don't pollute UMA.
574 if (command_line->HasSwitch(switches::kForceFieldTrials)) { 577 if (command_line->HasSwitch(switches::kForceFieldTrials)) {
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 chromeos::CrosSettings::Shutdown(); 1656 chromeos::CrosSettings::Shutdown();
1654 #endif 1657 #endif
1655 #endif 1658 #endif
1656 } 1659 }
1657 1660
1658 // Public members: 1661 // Public members:
1659 1662
1660 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1663 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1661 chrome_extra_parts_.push_back(parts); 1664 chrome_extra_parts_.push_back(parts);
1662 } 1665 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698