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

Side by Side Diff: chrome/browser/extensions/blob_reader.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, 12 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 9
9 #include "base/format_macros.h" 10 #include "base/format_macros.h"
10 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
11 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "net/http/http_request_headers.h" 15 #include "net/http/http_request_headers.h"
15 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
16 #include "net/url_request/url_fetcher.h" 17 #include "net/url_request/url_fetcher.h"
17 #include "net/url_request/url_request_context.h" 18 #include "net/url_request/url_request_context.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 fetcher_->Start(); 57 fetcher_->Start();
57 } 58 }
58 59
59 // Overridden from net::URLFetcherDelegate. 60 // Overridden from net::URLFetcherDelegate.
60 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) { 61 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) {
61 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 62 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
62 scoped_ptr<std::string> response(new std::string); 63 scoped_ptr<std::string> response(new std::string);
63 int64_t first = 0, last = 0, length = 0; 64 int64_t first = 0, last = 0, length = 0;
64 source->GetResponseAsString(response.get()); 65 source->GetResponseAsString(response.get());
65 source->GetResponseHeaders()->GetContentRange(&first, &last, &length); 66 source->GetResponseHeaders()->GetContentRange(&first, &last, &length);
66 callback_.Run(response.Pass(), length); 67 callback_.Run(std::move(response), length);
67 68
68 delete this; 69 delete this;
69 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/background_app_browsertest.cc ('k') | chrome/browser/extensions/bundle_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698