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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 15017018: Prevent unauthorized commits of the Chrome Web Store URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment 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) 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 const base::Closure& callback); 415 const base::Closure& callback);
416 void SetAccessibilityLoadCompleteCallbackForTesting( 416 void SetAccessibilityLoadCompleteCallbackForTesting(
417 const base::Closure& callback); 417 const base::Closure& callback);
418 void SetAccessibilityOtherCallbackForTesting( 418 void SetAccessibilityOtherCallbackForTesting(
419 const base::Closure& callback); 419 const base::Closure& callback);
420 420
421 bool is_waiting_for_unload_ack_for_testing() { 421 bool is_waiting_for_unload_ack_for_testing() {
422 return is_waiting_for_unload_ack_; 422 return is_waiting_for_unload_ack_;
423 } 423 }
424 424
425 // Returns whether the given URL is allowed to commit in the current process.
426 // This is a more conservative check than FilterURL, since it will be used to
427 // kill processes that commit unauthorized URLs.
428 bool CanCommitURL(const GURL& url);
429
425 // Checks that the given renderer can request |url|, if not it sets it to 430 // Checks that the given renderer can request |url|, if not it sets it to
426 // about:blank. 431 // about:blank.
427 // empty_allowed must be set to false for navigations for security reasons. 432 // empty_allowed must be set to false for navigations for security reasons.
428 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, 433 static void FilterURL(ChildProcessSecurityPolicyImpl* policy,
429 const RenderProcessHost* process, 434 const RenderProcessHost* process,
430 bool empty_allowed, 435 bool empty_allowed,
431 GURL* url); 436 GURL* url);
432 437
433 // NOTE: Do not add functions that just send an IPC message that are called in 438 // NOTE: Do not add functions that just send an IPC message that are called in
434 // one or two places. Have the caller send the IPC message directly (unless 439 // one or two places. Have the caller send the IPC message directly (unless
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 694 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
690 }; 695 };
691 696
692 #if defined(COMPILER_MSVC) 697 #if defined(COMPILER_MSVC)
693 #pragma warning(pop) 698 #pragma warning(pop)
694 #endif 699 #endif
695 700
696 } // namespace content 701 } // namespace content
697 702
698 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 703 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698