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

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

Issue 156703006: Cleanup: Remove unneeded browser_thread.h includes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 | Annotate | Revision Log
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 "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "content/public/browser/browser_thread.h"
12 #include "net/http/http_request_headers.h" 11 #include "net/http/http_request_headers.h"
13 #include "net/http/http_response_headers.h" 12 #include "net/http/http_response_headers.h"
14 #include "net/url_request/url_fetcher.h" 13 #include "net/url_request/url_fetcher.h"
15 #include "net/url_request/url_request_context.h" 14 #include "net/url_request/url_request_context.h"
16 #include "net/url_request/url_request_context_getter.h" 15 #include "net/url_request/url_request_context_getter.h"
17 16
18 BlobReader::BlobReader(Profile* profile, 17 BlobReader::BlobReader(Profile* profile,
19 const std::string& blob_uuid, 18 const std::string& blob_uuid,
20 BlobReadCallback callback) 19 BlobReadCallback callback)
21 : callback_(callback) { 20 : callback_(callback) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Overridden from net::URLFetcherDelegate. 55 // Overridden from net::URLFetcherDelegate.
57 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) { 56 void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) {
58 scoped_ptr<std::string> response(new std::string); 57 scoped_ptr<std::string> response(new std::string);
59 int64 first = 0, last = 0, length = 0; 58 int64 first = 0, last = 0, length = 0;
60 source->GetResponseAsString(response.get()); 59 source->GetResponseAsString(response.get());
61 source->GetResponseHeaders()->GetContentRange(&first, &last, &length); 60 source->GetResponseHeaders()->GetContentRange(&first, &last, &length);
62 callback_.Run(response.Pass(), length); 61 callback_.Run(response.Pass(), length);
63 62
64 delete this; 63 delete this;
65 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/system_info/system_info_provider.cc ('k') | chrome/browser/extensions/extension_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698