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

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

Issue 10068021: Fix file access on Chrome for ChromeOS on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix net unittests Created 8 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
« no previous file with comments | « net/url_request/url_request_job_manager.h ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_manager.h" 5 #include "net/url_request/url_request_job_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 for (size_t i = 0; i < arraysize(kBuiltinFactories); ++i) { 115 for (size_t i = 0; i < arraysize(kBuiltinFactories); ++i) {
116 if (scheme == kBuiltinFactories[i].scheme) { 116 if (scheme == kBuiltinFactories[i].scheme) {
117 URLRequestJob* job = (kBuiltinFactories[i].factory)(request, scheme); 117 URLRequestJob* job = (kBuiltinFactories[i].factory)(request, scheme);
118 DCHECK(job); // The built-in factories are not expected to fail! 118 DCHECK(job); // The built-in factories are not expected to fail!
119 return job; 119 return job;
120 } 120 }
121 } 121 }
122 122
123 // If we reached here, then it means that a registered protocol factory 123 // If we reached here, then it means that a registered protocol factory
124 // wasn't interested in handling the URL. That is fairly unexpected, and we 124 // wasn't interested in handling the URL. That is fairly unexpected, and we
125 // don't know have a specific error to report here :-( 125 // don't have a specific error to report here :-(
126 LOG(WARNING) << "Failed to map: " << request->url().spec(); 126 LOG(WARNING) << "Failed to map: " << request->url().spec();
127 return new URLRequestErrorJob(request, ERR_FAILED); 127 return new URLRequestErrorJob(request, ERR_FAILED);
128 } 128 }
129 129
130 URLRequestJob* URLRequestJobManager::MaybeInterceptRedirect( 130 URLRequestJob* URLRequestJobManager::MaybeInterceptRedirect(
131 URLRequest* request, 131 URLRequest* request,
132 const GURL& location) const { 132 const GURL& location) const {
133 DCHECK(IsAllowedThread()); 133 DCHECK(IsAllowedThread());
134 if (!request->url().is_valid() || 134 if (!request->url().is_valid() ||
135 request->load_flags() & LOAD_DISABLE_INTERCEPT || 135 request->load_flags() & LOAD_DISABLE_INTERCEPT ||
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 base::AutoLock locked(lock_); 257 base::AutoLock locked(lock_);
258 258
259 InterceptorList::iterator i = 259 InterceptorList::iterator i =
260 std::find(interceptors_.begin(), interceptors_.end(), interceptor); 260 std::find(interceptors_.begin(), interceptors_.end(), interceptor);
261 DCHECK(i != interceptors_.end()); 261 DCHECK(i != interceptors_.end());
262 interceptors_.erase(i); 262 interceptors_.erase(i);
263 } 263 }
264 264
265 URLRequestJobManager::URLRequestJobManager() 265 URLRequestJobManager::URLRequestJobManager()
266 : allowed_thread_(0), 266 : allowed_thread_(0),
267 allowed_thread_initialized_(false), 267 allowed_thread_initialized_(false) {
268 enable_file_access_(false) {
269 } 268 }
270 269
271 URLRequestJobManager::~URLRequestJobManager() {} 270 URLRequestJobManager::~URLRequestJobManager() {}
272 271
273 } // namespace net 272 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_manager.h ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698