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

Side by Side Diff: components/cronet/android/cronet_url_request_adapter.cc

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: followupfix-after-rebase Created 5 years, 1 month 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 "cronet_url_request_adapter.h" 5 #include "cronet_url_request_adapter.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 DCHECK(context_->IsOnNetworkThread()); 373 DCHECK(context_->IsOnNetworkThread());
374 if (send_on_canceled) { 374 if (send_on_canceled) {
375 JNIEnv* env = base::android::AttachCurrentThread(); 375 JNIEnv* env = base::android::AttachCurrentThread();
376 cronet::Java_CronetUrlRequest_onCanceled(env, owner_.obj()); 376 cronet::Java_CronetUrlRequest_onCanceled(env, owner_.obj());
377 } 377 }
378 delete this; 378 delete this;
379 } 379 }
380 380
381 bool CronetURLRequestAdapter::MaybeReportError(net::URLRequest* request) const { 381 bool CronetURLRequestAdapter::MaybeReportError(net::URLRequest* request) const {
382 DCHECK_NE(net::URLRequestStatus::IO_PENDING, url_request_->status().status()); 382 DCHECK_NE(net::URLRequestStatus::IO_PENDING, url_request_->status().status());
383 DCHECK_EQ(request, url_request_); 383 DCHECK_EQ(request, url_request_.get());
384 if (url_request_->status().is_success()) 384 if (url_request_->status().is_success())
385 return false; 385 return false;
386 int net_error = url_request_->status().error(); 386 int net_error = url_request_->status().error();
387 VLOG(1) << "Error " << net::ErrorToString(net_error) 387 VLOG(1) << "Error " << net::ErrorToString(net_error)
388 << " on chromium request: " << initial_url_.possibly_invalid_spec(); 388 << " on chromium request: " << initial_url_.possibly_invalid_spec();
389 JNIEnv* env = base::android::AttachCurrentThread(); 389 JNIEnv* env = base::android::AttachCurrentThread();
390 cronet::Java_CronetUrlRequest_onError( 390 cronet::Java_CronetUrlRequest_onError(
391 env, owner_.obj(), net_error, 391 env, owner_.obj(), net_error,
392 ConvertUTF8ToJavaString(env, net::ErrorToString(net_error)).obj(), 392 ConvertUTF8ToJavaString(env, net::ErrorToString(net_error)).obj(),
393 request->GetTotalReceivedBytes()); 393 request->GetTotalReceivedBytes());
394 return true; 394 return true;
395 } 395 }
396 396
397 } // namespace cronet 397 } // namespace cronet
OLDNEW
« no previous file with comments | « components/browser_sync/browser/profile_sync_service.cc ('k') | components/invalidation/impl/gcm_invalidation_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698