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

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

Issue 24891002: Initial WebUI extension for enhanced bookmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 #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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 IsURLAllowedInIncognito(stripped_url, browser_context); 670 IsURLAllowedInIncognito(stripped_url, browser_context);
671 } 671 }
672 // Most URLs are allowed in incognito; the following are exceptions. 672 // Most URLs are allowed in incognito; the following are exceptions.
673 // chrome://extensions is on the list because it redirects to 673 // chrome://extensions is on the list because it redirects to
674 // chrome://settings. 674 // chrome://settings.
675 if (url.scheme() == chrome::kChromeUIScheme && 675 if (url.scheme() == chrome::kChromeUIScheme &&
676 (url.host() == chrome::kChromeUISettingsHost || 676 (url.host() == chrome::kChromeUISettingsHost ||
677 url.host() == chrome::kChromeUISettingsFrameHost || 677 url.host() == chrome::kChromeUISettingsFrameHost ||
678 url.host() == chrome::kChromeUIExtensionsHost || 678 url.host() == chrome::kChromeUIExtensionsHost ||
679 url.host() == chrome::kChromeUIBookmarksHost || 679 url.host() == chrome::kChromeUIBookmarksHost ||
680 url.host() == chrome::kChromeUIEnhancedBookmarksHost ||
680 url.host() == chrome::kChromeUIUberHost)) { 681 url.host() == chrome::kChromeUIUberHost)) {
681 return false; 682 return false;
682 } 683 }
683 684
684 GURL rewritten_url = url; 685 GURL rewritten_url = url;
685 bool reverse_on_redirect = false; 686 bool reverse_on_redirect = false;
686 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 687 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
687 &rewritten_url, browser_context, &reverse_on_redirect); 688 &rewritten_url, browser_context, &reverse_on_redirect);
688 689
689 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 690 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
690 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && 691 return !(rewritten_url.scheme() == chrome::kChromeUIScheme &&
691 rewritten_url.host() == chrome::kChromeUIUberHost); 692 rewritten_url.host() == chrome::kChromeUIUberHost);
692 } 693 }
693 694
694 } // namespace chrome 695 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698