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

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

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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>
8
7 #include "base/callback.h" 9 #include "base/callback.h"
8 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
9 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/chrome_content_client.h" 14 #include "chrome/common/chrome_content_client.h"
13 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
14 16
15 using content::BrowserThread; 17 using content::BrowserThread;
16 using feedback::FeedbackData; 18 using feedback::FeedbackData;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 screenshot_reader->Start(); 68 screenshot_reader->Start();
67 } 69 }
68 70
69 CompleteSendFeedback(); 71 CompleteSendFeedback();
70 } 72 }
71 73
72 void FeedbackService::AttachedFileCallback(scoped_ptr<std::string> data, 74 void FeedbackService::AttachedFileCallback(scoped_ptr<std::string> data,
73 int64_t /* total_blob_length */) { 75 int64_t /* total_blob_length */) {
74 feedback_data_->set_attached_file_uuid(std::string()); 76 feedback_data_->set_attached_file_uuid(std::string());
75 if (data) 77 if (data)
76 feedback_data_->AttachAndCompressFileData(data.Pass()); 78 feedback_data_->AttachAndCompressFileData(std::move(data));
77 79
78 CompleteSendFeedback(); 80 CompleteSendFeedback();
79 } 81 }
80 82
81 void FeedbackService::ScreenshotCallback(scoped_ptr<std::string> data, 83 void FeedbackService::ScreenshotCallback(scoped_ptr<std::string> data,
82 int64_t /* total_blob_length */) { 84 int64_t /* total_blob_length */) {
83 feedback_data_->set_screenshot_uuid(std::string()); 85 feedback_data_->set_screenshot_uuid(std::string());
84 if (data) 86 if (data)
85 feedback_data_->set_image(data.Pass()); 87 feedback_data_->set_image(std::move(data));
86 88
87 CompleteSendFeedback(); 89 CompleteSendFeedback();
88 } 90 }
89 91
90 void FeedbackService::GetSystemInformation( 92 void FeedbackService::GetSystemInformation(
91 const GetSystemInformationCallback& callback) { 93 const GetSystemInformationCallback& callback) {
92 system_information_callback_ = callback; 94 system_information_callback_ = callback;
93 95
94 system_logs::ScrubbedSystemLogsFetcher* fetcher = 96 system_logs::ScrubbedSystemLogsFetcher* fetcher =
95 new system_logs::ScrubbedSystemLogsFetcher(); 97 new system_logs::ScrubbedSystemLogsFetcher();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Signal the feedback object that the data from the feedback page has been 130 // Signal the feedback object that the data from the feedback page has been
129 // filled - the object will manage sending of the actual report. 131 // filled - the object will manage sending of the actual report.
130 feedback_data_->OnFeedbackPageDataComplete(); 132 feedback_data_->OnFeedbackPageDataComplete();
131 // TODO(rkc): Change this once we have FeedbackData/Util refactored to 133 // TODO(rkc): Change this once we have FeedbackData/Util refactored to
132 // report the status of the report being sent. 134 // report the status of the report being sent.
133 send_feedback_callback_.Run(true); 135 send_feedback_callback_.Run(true);
134 } 136 }
135 } 137 }
136 138
137 } // namespace extensions 139 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698