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/stringprintf.h" | 11 #include "base/stringprintf.h" |
11 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/browser_about_handler.h" | 13 #include "chrome/browser/browser_about_handler.h" |
13 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/extensions/tab_helper.h" | 15 #include "chrome/browser/extensions/tab_helper.h" |
15 #include "chrome/browser/google/google_url_tracker.h" | 16 #include "chrome/browser/google/google_url_tracker.h" |
16 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 17 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
17 #include "chrome/browser/prefs/pref_service.h" | |
18 #include "chrome/browser/prerender/prerender_manager.h" | 18 #include "chrome/browser/prerender/prerender_manager.h" |
19 #include "chrome/browser/prerender/prerender_manager_factory.h" | 19 #include "chrome/browser/prerender/prerender_manager_factory.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/tab_contents/tab_util.h" | 21 #include "chrome/browser/tab_contents/tab_util.h" |
22 #include "chrome/browser/ui/browser.h" | 22 #include "chrome/browser/ui/browser.h" |
23 #include "chrome/browser/ui/browser_finder.h" | 23 #include "chrome/browser/ui/browser_finder.h" |
24 #include "chrome/browser/ui/browser_instant_controller.h" | 24 #include "chrome/browser/ui/browser_instant_controller.h" |
25 #include "chrome/browser/ui/browser_tab_contents.h" | 25 #include "chrome/browser/ui/browser_tab_contents.h" |
26 #include "chrome/browser/ui/browser_window.h" | 26 #include "chrome/browser/ui/browser_window.h" |
27 #include "chrome/browser/ui/host_desktop.h" | 27 #include "chrome/browser/ui/host_desktop.h" |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 bool reverse_on_redirect = false; | 645 bool reverse_on_redirect = false; |
646 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( | 646 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( |
647 &rewritten_url, browser_context, &reverse_on_redirect); | 647 &rewritten_url, browser_context, &reverse_on_redirect); |
648 | 648 |
649 // Some URLs are mapped to uber subpages. Do not allow them in incognito. | 649 // Some URLs are mapped to uber subpages. Do not allow them in incognito. |
650 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && | 650 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && |
651 rewritten_url.host() == chrome::kChromeUIUberHost); | 651 rewritten_url.host() == chrome::kChromeUIUberHost); |
652 } | 652 } |
653 | 653 |
654 } // namespace chrome | 654 } // namespace chrome |
OLD | NEW |