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

Side by Side Diff: content/browser/android/content_protocol_handler_impl.cc

Issue 739033003: Support content scheme uri for Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years 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
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/android/content_protocol_handler_impl.h"
6
7 #include "base/task_runner.h"
8 #include "content/browser/android/url_request_content_job.h"
9 #include "net/base/net_errors.h"
10 #include "net/url_request/url_request.h"
11 #include "net/url_request/url_request_error_job.h"
12
13 namespace content {
14
15 // static
16 ContentProtocolHandler* ContentProtocolHandler::Create(
17 const scoped_refptr<base::TaskRunner>& content_task_runner) {
18 return new ContentProtocolHandlerImpl(content_task_runner);
19 }
20
21 ContentProtocolHandlerImpl::ContentProtocolHandlerImpl(
22 const scoped_refptr<base::TaskRunner>& content_task_runner)
23 : content_task_runner_(content_task_runner) {}
24
25 ContentProtocolHandlerImpl::~ContentProtocolHandlerImpl() {}
26
27 net::URLRequestJob* ContentProtocolHandlerImpl::MaybeCreateJob(
28 net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
29 if (!network_delegate) {
30 return new net::URLRequestErrorJob(
31 request, network_delegate, net::ERR_ACCESS_DENIED);
32 }
33 return new URLRequestContentJob(
34 request, network_delegate, base::FilePath(request->url().spec()),
35 content_task_runner_);
36 }
37
38 bool ContentProtocolHandlerImpl::IsSafeRedirectTarget(
39 const GURL& location) const {
40 return false;
41 }
42
43 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_protocol_handler_impl.h ('k') | content/browser/android/url_request_content_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698