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

Side by Side Diff: chrome/browser/extensions/blob_reader.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 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/blob_reader.h" 5 #include "chrome/browser/extensions/blob_reader.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void BlobReader::Start() { 55 void BlobReader::Start() {
56 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 56 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
57 fetcher_->Start(); 57 fetcher_->Start();
58 } 58 }
59 59
60 // Overridden from net::URLFetcherDelegate. 60 // Overridden from net::URLFetcherDelegate.
61 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) { 61 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) {
62 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 62 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
63 scoped_ptr<std::string> response(new std::string); 63 std::unique_ptr<std::string> response(new std::string);
64 int64_t first = 0, last = 0, length = 0; 64 int64_t first = 0, last = 0, length = 0;
65 source->GetResponseAsString(response.get()); 65 source->GetResponseAsString(response.get());
66 source->GetResponseHeaders()->GetContentRange(&first, &last, &length); 66 source->GetResponseHeaders()->GetContentRange(&first, &last, &length);
67 callback_.Run(std::move(response), length); 67 callback_.Run(std::move(response), length);
68 68
69 delete this; 69 delete this;
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/blob_reader.h ('k') | chrome/browser/extensions/bookmark_app_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698