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

Side by Side Diff: content/browser/loader/stream_resource_handler.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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 "content/browser/loader/stream_resource_handler.h" 5 #include "content/browser/loader/stream_resource_handler.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/streams/stream.h" 9 #include "content/browser/streams/stream.h"
10 #include "content/browser/streams/stream_registry.h" 10 #include "content/browser/streams/stream_registry.h"
11 #include "content/public/browser/resource_controller.h" 11 #include "content/public/browser/resource_controller.h"
12 #include "content/public/common/url_constants.h"
13 #include "net/base/io_buffer.h" 12 #include "net/base/io_buffer.h"
14 #include "net/url_request/url_request_status.h" 13 #include "net/url_request/url_request_status.h"
14 #include "url/url_constants.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 StreamResourceHandler::StreamResourceHandler(net::URLRequest* request, 18 StreamResourceHandler::StreamResourceHandler(net::URLRequest* request,
19 StreamRegistry* registry, 19 StreamRegistry* registry,
20 const GURL& origin) 20 const GURL& origin)
21 : ResourceHandler(request), 21 : ResourceHandler(request),
22 read_buffer_(NULL) { 22 read_buffer_(NULL) {
23 // TODO(tyoshino): Find a way to share this with the blob URL creation in 23 // TODO(tyoshino): Find a way to share this with the blob URL creation in
24 // WebKit. 24 // WebKit.
25 GURL url(std::string(kBlobScheme) + ":" + origin.spec() + 25 GURL url(std::string(url::kBlobScheme) + ":" + origin.spec() +
26 base::GenerateGUID()); 26 base::GenerateGUID());
27 stream_ = new Stream(registry, this, url); 27 stream_ = new Stream(registry, this, url);
28 } 28 }
29 29
30 StreamResourceHandler::~StreamResourceHandler() { 30 StreamResourceHandler::~StreamResourceHandler() {
31 stream_->RemoveWriteObserver(this); 31 stream_->RemoveWriteObserver(this);
32 } 32 }
33 33
34 bool StreamResourceHandler::OnUploadProgress(int request_id, 34 bool StreamResourceHandler::OnUploadProgress(int request_id,
35 uint64 position, 35 uint64 position,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void StreamResourceHandler::OnSpaceAvailable(Stream* stream) { 115 void StreamResourceHandler::OnSpaceAvailable(Stream* stream) {
116 controller()->Resume(); 116 controller()->Resume();
117 } 117 }
118 118
119 void StreamResourceHandler::OnClose(Stream* stream) { 119 void StreamResourceHandler::OnClose(Stream* stream) {
120 controller()->Cancel(); 120 controller()->Cancel();
121 } 121 }
122 122
123 } // namespace content 123 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/media/android/media_resource_getter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698