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

Side by Side Diff: chrome/browser/extensions/api/experience_sampling_private/experience_sampling_private_api.cc

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 4 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698