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

Side by Side Diff: net/url_request/url_request_job_factory_impl.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/url_request/url_request_job_factory_impl.h" 5 #include "net/url_request/url_request_job_factory_impl.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/url_request/url_request_job_manager.h" 10 #include "net/url_request/url_request_job_manager.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const { 59 bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const {
60 if (!url.is_valid()) { 60 if (!url.is_valid()) {
61 // We handle error cases. 61 // We handle error cases.
62 return true; 62 return true;
63 } 63 }
64 return IsHandledProtocol(url.scheme()); 64 return IsHandledProtocol(url.scheme());
65 } 65 }
66 66
67 bool URLRequestJobFactoryImpl::IsSafeRedirectTarget(
68 const GURL& location) const {
69 DCHECK(CalledOnValidThread());
70 if (!location.is_valid()) {
71 // Error cases are safely handled.
72 return true;
73 }
74 ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find(
75 location.scheme());
76 if (it == protocol_handler_map_.end()) {
77 // Unhandled cases are safely handled.
78 return true;
79 }
80 return it->second->IsSafeRedirectTarget(location);
81 }
82
67 } // namespace net 83 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_factory_impl.h ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698