OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/tracing/chrome_tracing_delegate.h" | 5 #include "chrome/browser/tracing/chrome_tracing_delegate.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/tracing/crash_service_uploader.h" | 13 #include "chrome/browser/tracing/crash_service_uploader.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_list.h" | 15 #include "chrome/browser/ui/browser_list.h" |
16 #include "chrome/browser/ui/browser_otr_state.h" | 16 #include "chrome/browser/ui/browser_otr_state.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/trace_event_args_whitelist.h" |
18 #include "components/metrics/metrics_pref_names.h" | 19 #include "components/metrics/metrics_pref_names.h" |
19 #include "components/variations/active_field_trials.h" | 20 #include "components/variations/active_field_trials.h" |
20 #include "content/public/browser/background_tracing_config.h" | 21 #include "content/public/browser/background_tracing_config.h" |
21 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
25 const int kMinDaysUntilNextUpload = 7; | 26 const int kMinDaysUntilNextUpload = 7; |
26 | 27 |
27 } // namespace | 28 } // namespace |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 DCHECK(metadata_dict); | 144 DCHECK(metadata_dict); |
144 std::vector<std::string> variations; | 145 std::vector<std::string> variations; |
145 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); | 146 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); |
146 | 147 |
147 scoped_ptr<base::ListValue> variations_list(new base::ListValue()); | 148 scoped_ptr<base::ListValue> variations_list(new base::ListValue()); |
148 for (const auto& it : variations) | 149 for (const auto& it : variations) |
149 variations_list->Append(new base::StringValue(it)); | 150 variations_list->Append(new base::StringValue(it)); |
150 | 151 |
151 metadata_dict->Set("field-trials", variations_list.Pass()); | 152 metadata_dict->Set("field-trials", variations_list.Pass()); |
152 } | 153 } |
| 154 |
| 155 content::MetadataFilterPredicate |
| 156 ChromeTracingDelegate::GetMetadataFilterPredicate() { |
| 157 return base::Bind(&IsMetadataWhitelisted); |
| 158 } |
OLD | NEW |