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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_service.cc

Issue 1822303002: [Extensions] Convert APIs to use movable types [4] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Istiaque's Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/feedback_private/feedback_service.h" 5 #include "chrome/browser/extensions/api/feedback_private/feedback_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/chrome_content_client.h" 14 #include "chrome/common/chrome_content_client.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 using extensions::api::feedback_private::SystemInformation;
18 using feedback::FeedbackData; 19 using feedback::FeedbackData;
19 20
20 namespace extensions { 21 namespace extensions {
21 22
22 namespace { 23 namespace {
23 24
24 void PopulateSystemInfo(SystemInformationList* sys_info_list, 25 void PopulateSystemInfo(SystemInformationList* sys_info_list,
25 const std::string& key, 26 const std::string& key,
26 const std::string& value) { 27 const std::string& value) {
27 base::DictionaryValue sys_info_value; 28 base::DictionaryValue sys_info_value;
28 sys_info_value.Set("key", new base::StringValue(key)); 29 sys_info_value.Set("key", new base::StringValue(key));
29 sys_info_value.Set("value", new base::StringValue(value)); 30 sys_info_value.Set("value", new base::StringValue(value));
30 31
31 linked_ptr<SystemInformation> sys_info(new SystemInformation()); 32 SystemInformation sys_info;
32 SystemInformation::Populate(sys_info_value, sys_info.get()); 33 SystemInformation::Populate(sys_info_value, &sys_info);
33 34
34 sys_info_list->push_back(sys_info); 35 sys_info_list->push_back(std::move(sys_info));
35 } 36 }
36 37
37 } // namespace 38 } // namespace
38 39
39 FeedbackService::FeedbackService() { 40 FeedbackService::FeedbackService() {
40 } 41 }
41 42
42 FeedbackService::~FeedbackService() { 43 FeedbackService::~FeedbackService() {
43 } 44 }
44 45
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // filled - the object will manage sending of the actual report. 134 // filled - the object will manage sending of the actual report.
134 feedback_data->OnFeedbackPageDataComplete(); 135 feedback_data->OnFeedbackPageDataComplete();
135 136
136 // TODO(rkc): Change this once we have FeedbackData/Util refactored to 137 // TODO(rkc): Change this once we have FeedbackData/Util refactored to
137 // report the status of the report being sent. 138 // report the status of the report being sent.
138 callback.Run(true); 139 callback.Run(true);
139 } 140 }
140 } 141 }
141 142
142 } // namespace extensions 143 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698