| OLD | NEW |
| 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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 GURL* url) { | 1287 GURL* url) { |
| 1288 if (!url->is_valid()) | 1288 if (!url->is_valid()) |
| 1289 return; // We don't need to block invalid URLs. | 1289 return; // We don't need to block invalid URLs. |
| 1290 | 1290 |
| 1291 if (url->SchemeIs(chrome::kAboutScheme)) { | 1291 if (url->SchemeIs(chrome::kAboutScheme)) { |
| 1292 // The renderer treats all URLs in the about: scheme as being about:blank. | 1292 // The renderer treats all URLs in the about: scheme as being about:blank. |
| 1293 // Canonicalize about: URLs to about:blank. | 1293 // Canonicalize about: URLs to about:blank. |
| 1294 *url = GURL(chrome::kAboutBlankURL); | 1294 *url = GURL(chrome::kAboutBlankURL); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 if (!policy->CanRequestURL(renderer_id, *url)) { | 1297 if (!policy->CanRequestURL(renderer_id, *url, NULL)) { |
| 1298 // If this renderer is not permitted to request this URL, we invalidate the | 1298 // If this renderer is not permitted to request this URL, we invalidate the |
| 1299 // URL. This prevents us from storing the blocked URL and becoming confused | 1299 // URL. This prevents us from storing the blocked URL and becoming confused |
| 1300 // later. | 1300 // later. |
| 1301 VLOG(1) << "Blocked URL " << url->spec(); | 1301 VLOG(1) << "Blocked URL " << url->spec(); |
| 1302 *url = GURL(); | 1302 *url = GURL(); |
| 1303 } | 1303 } |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 void RenderViewHost::SetAltErrorPageURL(const GURL& url) { | 1306 void RenderViewHost::SetAltErrorPageURL(const GURL& url) { |
| 1307 Send(new ViewMsg_SetAltErrorPageURL(routing_id(), url)); | 1307 Send(new ViewMsg_SetAltErrorPageURL(routing_id(), url)); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 | 1521 |
| 1522 void RenderViewHost::OnWebUISend(const GURL& source_url, | 1522 void RenderViewHost::OnWebUISend(const GURL& source_url, |
| 1523 const std::string& name, | 1523 const std::string& name, |
| 1524 const base::ListValue& args) { | 1524 const base::ListValue& args) { |
| 1525 delegate_->WebUISend(this, source_url, name, args); | 1525 delegate_->WebUISend(this, source_url, name, args); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 void RenderViewHost::ClearPowerSaveBlockers() { | 1528 void RenderViewHost::ClearPowerSaveBlockers() { |
| 1529 STLDeleteValues(&power_save_blockers_); | 1529 STLDeleteValues(&power_save_blockers_); |
| 1530 } | 1530 } |
| OLD | NEW |