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

Side by Side Diff: chrome/browser/ui/browser_navigator.cc

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Fix Android Created 3 years, 9 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 "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/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/ui/status_bubble.h" 29 #include "chrome/browser/ui/status_bubble.h"
30 #include "chrome/browser/ui/tab_helpers.h" 30 #include "chrome/browser/ui/tab_helpers.h"
31 #include "chrome/browser/ui/tabs/tab_strip_model.h" 31 #include "chrome/browser/ui/tabs/tab_strip_model.h"
32 #include "chrome/common/url_constants.h" 32 #include "chrome/common/url_constants.h"
33 #include "components/prefs/pref_service.h" 33 #include "components/prefs/pref_service.h"
34 #include "content/public/browser/browser_url_handler.h" 34 #include "content/public/browser/browser_url_handler.h"
35 #include "content/public/browser/navigation_entry.h" 35 #include "content/public/browser/navigation_entry.h"
36 #include "content/public/browser/notification_service.h" 36 #include "content/public/browser/notification_service.h"
37 #include "content/public/browser/render_view_host.h" 37 #include "content/public/browser/render_view_host.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "content/public/common/url_constants.h"
40 #include "extensions/features/features.h" 39 #include "extensions/features/features.h"
41 40
42 #if defined(USE_ASH) 41 #if defined(USE_ASH)
43 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" 42 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
44 #include "components/signin/core/account_id/account_id.h" 43 #include "components/signin/core/account_id/account_id.h"
45 #endif 44 #endif
46 45
47 #if defined(USE_AURA) 46 #if defined(USE_AURA)
48 #include "ui/aura/window.h" 47 #include "ui/aura/window.h"
49 #endif 48 #endif
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 IsURLAllowedInIncognito(stripped_url, browser_context); 636 IsURLAllowedInIncognito(stripped_url, browser_context);
638 } 637 }
639 // Most URLs are allowed in incognito; the following are exceptions. 638 // Most URLs are allowed in incognito; the following are exceptions.
640 // chrome://extensions is on the list because it redirects to 639 // chrome://extensions is on the list because it redirects to
641 // chrome://settings. 640 // chrome://settings.
642 if (url.scheme() == content::kChromeUIScheme && 641 if (url.scheme() == content::kChromeUIScheme &&
643 (url.host_piece() == chrome::kChromeUISettingsHost || 642 (url.host_piece() == chrome::kChromeUISettingsHost ||
644 url.host_piece() == chrome::kChromeUIMdSettingsHost || 643 url.host_piece() == chrome::kChromeUIMdSettingsHost ||
645 url.host_piece() == chrome::kChromeUISettingsFrameHost || 644 url.host_piece() == chrome::kChromeUISettingsFrameHost ||
646 url.host_piece() == chrome::kChromeUIHelpHost || 645 url.host_piece() == chrome::kChromeUIHelpHost ||
647 url.host_piece() == content::kChromeUIHistoryHost || 646 url.host_piece() == chrome::kChromeUIHistoryHost ||
648 url.host_piece() == chrome::kChromeUIExtensionsHost || 647 url.host_piece() == chrome::kChromeUIExtensionsHost ||
649 url.host_piece() == chrome::kChromeUIBookmarksHost || 648 url.host_piece() == chrome::kChromeUIBookmarksHost ||
650 #if !defined(OS_CHROMEOS) 649 #if !defined(OS_CHROMEOS)
651 url.host_piece() == chrome::kChromeUIChromeSigninHost || 650 url.host_piece() == chrome::kChromeUIChromeSigninHost ||
652 #endif 651 #endif
653 url.host_piece() == chrome::kChromeUIUberHost || 652 url.host_piece() == chrome::kChromeUIUberHost ||
654 url.host_piece() == chrome::kChromeUIThumbnailHost || 653 url.host_piece() == chrome::kChromeUIThumbnailHost ||
655 url.host_piece() == chrome::kChromeUIThumbnailHost2 || 654 url.host_piece() == chrome::kChromeUIThumbnailHost2 ||
656 url.host_piece() == chrome::kChromeUIThumbnailListHost || 655 url.host_piece() == chrome::kChromeUIThumbnailListHost ||
657 url.host_piece() == chrome::kChromeUISuggestionsHost || 656 url.host_piece() == chrome::kChromeUISuggestionsHost ||
(...skipping 16 matching lines...) Expand all
674 bool reverse_on_redirect = false; 673 bool reverse_on_redirect = false;
675 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 674 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
676 &rewritten_url, browser_context, &reverse_on_redirect); 675 &rewritten_url, browser_context, &reverse_on_redirect);
677 676
678 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 677 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
679 return !(rewritten_url.scheme_piece() == content::kChromeUIScheme && 678 return !(rewritten_url.scheme_piece() == content::kChromeUIScheme &&
680 rewritten_url.host_piece() == chrome::kChromeUIUberHost); 679 rewritten_url.host_piece() == chrome::kChromeUIUberHost);
681 } 680 }
682 681
683 } // namespace chrome 682 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_common_utils_unittest.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698