| OLD | NEW |
| 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 "chrome/browser/ui/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 nav_params->is_renderer_initiated = params.is_renderer_initiated; | 492 nav_params->is_renderer_initiated = params.is_renderer_initiated; |
| 493 nav_params->transferred_global_request_id = | 493 nav_params->transferred_global_request_id = |
| 494 params.transferred_global_request_id; | 494 params.transferred_global_request_id; |
| 495 nav_params->should_replace_current_entry = | 495 nav_params->should_replace_current_entry = |
| 496 params.should_replace_current_entry; | 496 params.should_replace_current_entry; |
| 497 nav_params->uses_post = params.uses_post; | 497 nav_params->uses_post = params.uses_post; |
| 498 nav_params->browser_initiated_post_data = params.browser_initiated_post_data; | 498 nav_params->browser_initiated_post_data = params.browser_initiated_post_data; |
| 499 } | 499 } |
| 500 | 500 |
| 501 void Navigate(NavigateParams* params) { | 501 void Navigate(NavigateParams* params) { |
| 502 LOG(ERROR) << "navigate to " << params->url; |
| 502 Browser* source_browser = params->browser; | 503 Browser* source_browser = params->browser; |
| 503 if (source_browser) | 504 if (source_browser) |
| 504 params->initiating_profile = source_browser->profile(); | 505 params->initiating_profile = source_browser->profile(); |
| 505 DCHECK(params->initiating_profile); | 506 DCHECK(params->initiating_profile); |
| 506 | 507 |
| 507 if (!AdjustNavigateParamsForURL(params)) | 508 if (!AdjustNavigateParamsForURL(params)) |
| 508 return; | 509 return; |
| 509 | 510 |
| 510 #if defined(ENABLE_EXTENSIONS) | 511 #if defined(ENABLE_EXTENSIONS) |
| 511 const extensions::Extension* extension = | 512 const extensions::Extension* extension = |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 bool reverse_on_redirect = false; | 751 bool reverse_on_redirect = false; |
| 751 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( | 752 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( |
| 752 &rewritten_url, browser_context, &reverse_on_redirect); | 753 &rewritten_url, browser_context, &reverse_on_redirect); |
| 753 | 754 |
| 754 // Some URLs are mapped to uber subpages. Do not allow them in incognito. | 755 // Some URLs are mapped to uber subpages. Do not allow them in incognito. |
| 755 return !(rewritten_url.scheme() == content::kChromeUIScheme && | 756 return !(rewritten_url.scheme() == content::kChromeUIScheme && |
| 756 rewritten_url.host() == chrome::kChromeUIUberHost); | 757 rewritten_url.host() == chrome::kChromeUIUberHost); |
| 757 } | 758 } |
| 758 | 759 |
| 759 } // namespace chrome | 760 } // namespace chrome |
| OLD | NEW |