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

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

Issue 2375563002: Stack sampling profiler: move configuration to chrome/common (Closed)
Patch Set: remove closure Created 4 years, 2 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 } 885 }
886 886
887 // Initialize FieldTrialSynchronizer system. This is a singleton and is used 887 // Initialize FieldTrialSynchronizer system. This is a singleton and is used
888 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 888 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
889 // Even though base::Bind does AddRef and Release, the object will not be 889 // Even though base::Bind does AddRef and Release, the object will not be
890 // deleted after the Task is executed. 890 // deleted after the Task is executed.
891 field_trial_synchronizer_ = new FieldTrialSynchronizer(); 891 field_trial_synchronizer_ = new FieldTrialSynchronizer();
892 892
893 // Register a synthetic field trial for the sampling profiler configuration 893 // Register a synthetic field trial for the sampling profiler configuration
894 // that was already chosen. 894 // that was already chosen.
895 sampling_profiler_config_.RegisterSyntheticFieldTrial(); 895 std::string trial_name, group_name;
896 if (sampling_profiler_config_.GetSyntheticFieldTrial(&trial_name,
897 &group_name)) {
898 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(trial_name,
899 group_name);
900 }
896 901
897 #if defined(OS_WIN) || defined(OS_MACOSX) || \ 902 #if defined(OS_WIN) || defined(OS_MACOSX) || \
898 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 903 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
899 metrics::DesktopSessionDurationTracker::Initialize(); 904 metrics::DesktopSessionDurationTracker::Initialize();
900 #endif 905 #endif
901 906
902 #if defined(OS_WIN) 907 #if defined(OS_WIN)
903 // Cleanup the PreRead field trial registry key. 908 // Cleanup the PreRead field trial registry key.
904 // TODO(fdoray): Remove this when M56 hits stable. 909 // TODO(fdoray): Remove this when M56 hits stable.
905 const base::string16 pre_read_field_trial_registry_path = 910 const base::string16 pre_read_field_trial_registry_path =
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 chromeos::CrosSettings::Shutdown(); 2222 chromeos::CrosSettings::Shutdown();
2218 #endif // defined(OS_CHROMEOS) 2223 #endif // defined(OS_CHROMEOS)
2219 #endif // defined(OS_ANDROID) 2224 #endif // defined(OS_ANDROID)
2220 } 2225 }
2221 2226
2222 // Public members: 2227 // Public members:
2223 2228
2224 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2229 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2225 chrome_extra_parts_.push_back(parts); 2230 chrome_extra_parts_.push_back(parts);
2226 } 2231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698