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

Side by Side Diff: chrome/browser/chromeos/feedback_util.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/feedback_util.h" 5 #include "chrome/browser/chromeos/feedback_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" 10 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
(...skipping 14 matching lines...) Expand all
25 25
26 void OnGetSystemInformation(Profile* profile, 26 void OnGetSystemInformation(Profile* profile,
27 const std::string& description, 27 const std::string& description,
28 const SendSysLogFeedbackCallback& callback, 28 const SendSysLogFeedbackCallback& callback,
29 const extensions::SystemInformationList& sys_info) { 29 const extensions::SystemInformationList& sys_info) {
30 scoped_refptr<FeedbackData> feedback_data(new FeedbackData()); 30 scoped_refptr<FeedbackData> feedback_data(new FeedbackData());
31 31
32 feedback_data->set_context(profile); 32 feedback_data->set_context(profile);
33 feedback_data->set_description(description); 33 feedback_data->set_description(description);
34 34
35 scoped_ptr<FeedbackData::SystemLogsMap> sys_logs( 35 std::unique_ptr<FeedbackData::SystemLogsMap> sys_logs(
36 new FeedbackData::SystemLogsMap); 36 new FeedbackData::SystemLogsMap);
37 for (const extensions::api::feedback_private::SystemInformation& info : 37 for (const extensions::api::feedback_private::SystemInformation& info :
38 sys_info) { 38 sys_info) {
39 (*sys_logs.get())[info.key] = info.value; 39 (*sys_logs.get())[info.key] = info.value;
40 } 40 }
41 feedback_data->SetAndCompressSystemInfo(std::move(sys_logs)); 41 feedback_data->SetAndCompressSystemInfo(std::move(sys_logs));
42 42
43 GetFeedbackService(profile)->SendFeedback(profile, feedback_data, callback); 43 GetFeedbackService(profile)->SendFeedback(profile, feedback_data, callback);
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 void SendSysLogFeedback(Profile* profile, 48 void SendSysLogFeedback(Profile* profile,
49 const std::string& description, 49 const std::string& description,
50 const SendSysLogFeedbackCallback& callback) { 50 const SendSysLogFeedbackCallback& callback) {
51 GetFeedbackService(profile)->GetSystemInformation( 51 GetFeedbackService(profile)->GetSystemInformation(
52 base::Bind(&OnGetSystemInformation, profile, description, callback)); 52 base::Bind(&OnGetSystemInformation, profile, description, callback));
53 } 53 }
54 54
55 } // namespace feedback_util 55 } // namespace feedback_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698