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

Side by Side Diff: content/browser/child_process_security_policy_impl.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/child_process_security_policy_impl.h" 5 #include "content/browser/child_process_security_policy_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 // A view-source URL is allowed if the child process is permitted to 611 // A view-source URL is allowed if the child process is permitted to
612 // request the embedded URL. Careful to avoid pointless recursion. 612 // request the embedded URL. Careful to avoid pointless recursion.
613 GURL child_url(url.GetContent()); 613 GURL child_url(url.GetContent());
614 if (child_url.SchemeIs(kViewSourceScheme) && 614 if (child_url.SchemeIs(kViewSourceScheme) &&
615 url.SchemeIs(kViewSourceScheme)) 615 url.SchemeIs(kViewSourceScheme))
616 return false; 616 return false;
617 617
618 return CanRequestURL(child_id, child_url); 618 return CanRequestURL(child_id, child_url);
619 } 619 }
620 620
621 if (LowerCaseEqualsASCII(url.spec(), url::kAboutBlankURL)) 621 if (base::LowerCaseEqualsASCII(url.spec(), url::kAboutBlankURL))
622 return true; // Every child process can request <about:blank>. 622 return true; // Every child process can request <about:blank>.
623 623
624 // URLs like <about:memory> and <about:crash> shouldn't be requestable by 624 // URLs like <about:memory> and <about:crash> shouldn't be requestable by
625 // any child process. Also, this case covers <javascript:...>, which should 625 // any child process. Also, this case covers <javascript:...>, which should
626 // be handled internally by the process and not kicked up to the browser. 626 // be handled internally by the process and not kicked up to the browser.
627 return false; 627 return false;
628 } 628 }
629 629
630 if (!GetContentClient()->browser()->IsHandledURL(url) && 630 if (!GetContentClient()->browser()->IsHandledURL(url) &&
631 !net::URLRequest::IsHandledURL(url)) { 631 !net::URLRequest::IsHandledURL(url)) {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 base::AutoLock lock(lock_); 887 base::AutoLock lock(lock_);
888 888
889 SecurityStateMap::iterator state = security_state_.find(child_id); 889 SecurityStateMap::iterator state = security_state_.find(child_id);
890 if (state == security_state_.end()) 890 if (state == security_state_.end())
891 return false; 891 return false;
892 892
893 return state->second->can_send_midi_sysex(); 893 return state->second->can_send_midi_sysex();
894 } 894 }
895 895
896 } // namespace content 896 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_state_impl_win.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698