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

Side by Side Diff: chrome/browser/child_process_security_policy.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/child_process_security_policy.h" 5 #include "chrome/browser/child_process_security_policy.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 if (LowerCaseEqualsASCII(url.spec(), chrome::kAboutBlankURL)) 344 if (LowerCaseEqualsASCII(url.spec(), chrome::kAboutBlankURL))
345 return true; // Every renderer can request <about:blank>. 345 return true; // Every renderer can request <about:blank>.
346 346
347 // URLs like <about:memory> and <about:crash> shouldn't be requestable by 347 // URLs like <about:memory> and <about:crash> shouldn't be requestable by
348 // any renderer. Also, this case covers <javascript:...>, which should be 348 // any renderer. Also, this case covers <javascript:...>, which should be
349 // handled internally by the renderer and not kicked up to the browser. 349 // handled internally by the renderer and not kicked up to the browser.
350 return false; 350 return false;
351 } 351 }
352 352
353 if (!URLRequest::IsHandledURL(url)) 353 if (!net::URLRequest::IsHandledURL(url))
354 return true; // This URL request is destined for ShellExecute. 354 return true; // This URL request is destined for ShellExecute.
355 355
356 { 356 {
357 AutoLock lock(lock_); 357 AutoLock lock(lock_);
358 358
359 SecurityStateMap::iterator state = security_state_.find(renderer_id); 359 SecurityStateMap::iterator state = security_state_.find(renderer_id);
360 if (state == security_state_.end()) 360 if (state == security_state_.end())
361 return false; 361 return false;
362 362
363 // Otherwise, we consult the renderer's security state to see if it is 363 // Otherwise, we consult the renderer's security state to see if it is
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) { 405 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) {
406 AutoLock lock(lock_); 406 AutoLock lock(lock_);
407 407
408 SecurityStateMap::iterator state = security_state_.find(renderer_id); 408 SecurityStateMap::iterator state = security_state_.find(renderer_id);
409 if (state == security_state_.end()) 409 if (state == security_state_.end())
410 return false; 410 return false;
411 411
412 return state->second->can_read_raw_cookies(); 412 return state->second->can_read_raw_cookies();
413 } 413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698