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

Side by Side Diff: google_apis/gcm/engine/unregistration_request.cc

Issue 1547233002: Convert Pass()→std::move() in //google_apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 "google_apis/gcm/engine/unregistration_request.h" 5 #include "google_apis/gcm/engine/unregistration_request.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
11 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
12 #include "base/values.h" 14 #include "base/values.h"
13 #include "google_apis/gcm/base/gcm_util.h" 15 #include "google_apis/gcm/base/gcm_util.h"
14 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" 16 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
15 #include "net/base/escape.h" 17 #include "net/base/escape.h"
16 #include "net/base/load_flags.h" 18 #include "net/base/load_flags.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const RequestInfo& request_info, 56 const RequestInfo& request_info,
55 scoped_ptr<CustomRequestHandler> custom_request_handler, 57 scoped_ptr<CustomRequestHandler> custom_request_handler,
56 const net::BackoffEntry::Policy& backoff_policy, 58 const net::BackoffEntry::Policy& backoff_policy,
57 const UnregistrationCallback& callback, 59 const UnregistrationCallback& callback,
58 int max_retry_count, 60 int max_retry_count,
59 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 61 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
60 GCMStatsRecorder* recorder, 62 GCMStatsRecorder* recorder,
61 const std::string& source_to_record) 63 const std::string& source_to_record)
62 : callback_(callback), 64 : callback_(callback),
63 request_info_(request_info), 65 request_info_(request_info),
64 custom_request_handler_(custom_request_handler.Pass()), 66 custom_request_handler_(std::move(custom_request_handler)),
65 registration_url_(registration_url), 67 registration_url_(registration_url),
66 backoff_entry_(&backoff_policy), 68 backoff_entry_(&backoff_policy),
67 request_context_getter_(request_context_getter), 69 request_context_getter_(request_context_getter),
68 retries_left_(max_retry_count), 70 retries_left_(max_retry_count),
69 recorder_(recorder), 71 recorder_(recorder),
70 source_to_record_(source_to_record), 72 source_to_record_(source_to_record),
71 weak_ptr_factory_(this) { 73 weak_ptr_factory_(this) {
72 DCHECK_GE(max_retry_count, 0); 74 DCHECK_GE(max_retry_count, 0);
73 } 75 }
74 76
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta()); 204 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta());
203 } 205 }
204 206
205 // status == SUCCESS || INVALID_PARAMETERS || UNKNOWN_ERROR || 207 // status == SUCCESS || INVALID_PARAMETERS || UNKNOWN_ERROR ||
206 // REACHED_MAX_RETRIES 208 // REACHED_MAX_RETRIES
207 209
208 callback_.Run(status); 210 callback_.Run(status);
209 } 211 }
210 212
211 } // namespace gcm 213 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/registration_request_unittest.cc ('k') | google_apis/gcm/engine/unregistration_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698