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

Side by Side Diff: chrome/browser/chromeos/attestation/attestation_ca_client.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/attestation/attestation_ca_client.h" 5 #include "chrome/browser/chromeos/attestation/attestation_ca_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
(...skipping 30 matching lines...) Expand all
41 41
42 void AttestationCAClient::OnURLFetchComplete(const net::URLFetcher* source) { 42 void AttestationCAClient::OnURLFetchComplete(const net::URLFetcher* source) {
43 FetcherCallbackMap::iterator iter = pending_requests_.find(source); 43 FetcherCallbackMap::iterator iter = pending_requests_.find(source);
44 if (iter == pending_requests_.end()) { 44 if (iter == pending_requests_.end()) {
45 LOG(WARNING) << "Callback from unknown source."; 45 LOG(WARNING) << "Callback from unknown source.";
46 return; 46 return;
47 } 47 }
48 48
49 DataCallback callback = iter->second; 49 DataCallback callback = iter->second;
50 pending_requests_.erase(iter); 50 pending_requests_.erase(iter);
51 scoped_ptr<const net::URLFetcher> scoped_source(source); 51 std::unique_ptr<const net::URLFetcher> scoped_source(source);
52 52
53 if (source->GetStatus().status() != net::URLRequestStatus::SUCCESS) { 53 if (source->GetStatus().status() != net::URLRequestStatus::SUCCESS) {
54 LOG(ERROR) << "Attestation CA request failed, status: " 54 LOG(ERROR) << "Attestation CA request failed, status: "
55 << source->GetStatus().status() << ", error: " 55 << source->GetStatus().status() << ", error: "
56 << source->GetStatus().error(); 56 << source->GetStatus().error();
57 callback.Run(false, ""); 57 callback.Run(false, "");
58 return; 58 return;
59 } 59 }
60 60
61 if (source->GetResponseCode() != net::HTTP_OK) { 61 if (source->GetResponseCode() != net::HTTP_OK) {
(...skipping 22 matching lines...) Expand all
84 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 84 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
85 net::LOAD_DO_NOT_SAVE_COOKIES | 85 net::LOAD_DO_NOT_SAVE_COOKIES |
86 net::LOAD_DISABLE_CACHE); 86 net::LOAD_DISABLE_CACHE);
87 fetcher->SetUploadData(kMimeContentType, request); 87 fetcher->SetUploadData(kMimeContentType, request);
88 pending_requests_[fetcher] = on_response; 88 pending_requests_[fetcher] = on_response;
89 fetcher->Start(); 89 fetcher->Start();
90 } 90 }
91 91
92 } // namespace attestation 92 } // namespace attestation
93 } // namespace chromeos 93 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_support_host.cc ('k') | chrome/browser/chromeos/attestation/attestation_policy_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698