summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 19:12:47 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 19:12:47 +0000
commitc4ff495718e7b190229e863e3387c4e5f99475a9 (patch)
tree3d2aef85fe5590905f80e71687154c664b9c42c0 /chrome/browser/browser_process_impl.cc
parent8348cb325bebf4d3516bd94949f5a4eb7c4056a9 (diff)
downloadchromium_src-c4ff495718e7b190229e863e3387c4e5f99475a9.zip
chromium_src-c4ff495718e7b190229e863e3387c4e5f99475a9.tar.gz
chromium_src-c4ff495718e7b190229e863e3387c4e5f99475a9.tar.bz2
Add autodetection of "intranet" redirection, for ISPs etc. that send typos and nonexistent addresses to custom pages, and plumb it to the code that puts up infobars when users type in a search that appears to be an intranet address, so we don't show these for erroneous cases.
BUG=31556 TEST=none Review URL: http://codereview.chromium.org/525079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index f19e6a6..481d210 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,6 +20,7 @@
#include "chrome/browser/download/save_file_manager.h"
#include "chrome/browser/google_url_tracker.h"
#include "chrome/browser/icon_manager.h"
+#include "chrome/browser/intranet_redirect_detector.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/net/dns_global.h"
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
@@ -182,12 +183,14 @@ BrowserProcessImpl::~BrowserProcessImpl() {
// any pending URLFetchers, and avoid creating any more.
SdchDictionaryFetcher::Shutdown();
- // We need to destroy the MetricsService and GoogleURLTracker before the
- // io_thread_ gets destroyed, since both destructors can call the URLFetcher
- // destructor, which does an PostDelayedTask operation on the IO thread. (The
- // IO thread will handle that URLFetcher operation before going away.)
+ // We need to destroy the MetricsService, GoogleURLTracker, and
+ // IntranetRedirectDetector before the io_thread_ gets destroyed, since their
+ // destructors can call the URLFetcher destructor, which does a
+ // PostDelayedTask operation on the IO thread. (The IO thread will handle
+ // that URLFetcher operation before going away.)
metrics_service_.reset();
google_url_tracker_.reset();
+ intranet_redirect_detector_.reset();
// Need to clear profiles (download managers) before the io_thread_.
profile_manager_.reset();
@@ -461,6 +464,13 @@ void BrowserProcessImpl::CreateGoogleURLTracker() {
google_url_tracker_.swap(google_url_tracker);
}
+void BrowserProcessImpl::CreateIntranetRedirectDetector() {
+ DCHECK(intranet_redirect_detector_.get() == NULL);
+ scoped_ptr<IntranetRedirectDetector> intranet_redirect_detector(
+ new IntranetRedirectDetector);
+ intranet_redirect_detector_.swap(intranet_redirect_detector);
+}
+
void BrowserProcessImpl::CreateNotificationUIManager() {
DCHECK(notification_ui_manager_.get() == NULL);
notification_ui_manager_.reset(NotificationUIManager::Create());