OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/experience_sampling_private/experience_s
ampling_private_api.h" | 5 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling_private_api.h" |
6 | 6 |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 #include "chrome/common/extensions/api/experience_sampling_private.h" | 8 #include "chrome/common/extensions/api/experience_sampling_private.h" |
9 | 9 |
10 namespace sampling = extensions::api::experience_sampling_private; | 10 namespace sampling = extensions::api::experience_sampling_private; |
11 | 11 |
12 namespace extensions { | 12 namespace extensions { |
13 | 13 |
14 bool ExperienceSamplingPrivateGetBrowserInfoFunction::RunAsync() { | 14 bool ExperienceSamplingPrivateGetBrowserInfoFunction::RunAsync() { |
15 std::string field_trials; | 15 std::string field_trials; |
16 sampling::BrowserInfo info; | 16 sampling::BrowserInfo info; |
17 | 17 |
18 base::FieldTrialList::StatesToString(&field_trials); | 18 base::FieldTrialList::StatesToString(&field_trials); |
19 info.variations = field_trials; | 19 info.variations = field_trials; |
20 | 20 |
21 SetResult(info.ToValue().release()); | 21 SetResult(info.ToValue()); |
22 SendResponse(true /* success */); | 22 SendResponse(true /* success */); |
23 return true; | 23 return true; |
24 } | 24 } |
25 | 25 |
26 } // namespace extensions | 26 } // namespace extensions |
OLD | NEW |