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

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

Issue 13820009: Create a ManagedModeNavigationObserver only for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the other test. Created 7 years, 8 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_tab_contents.h" 5 #include "chrome/browser/ui/browser_tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 10 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "extensions/browser/view_type_utils.h" 50 #include "extensions/browser/view_type_utils.h"
51 51
52 #if defined(ENABLE_AUTOMATION) 52 #if defined(ENABLE_AUTOMATION)
53 #include "chrome/browser/automation/automation_tab_helper.h" 53 #include "chrome/browser/automation/automation_tab_helper.h"
54 #endif 54 #endif
55 55
56 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 56 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
57 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" 57 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
58 #endif 58 #endif
59 59
60 #if defined(ENABLE_MANAGED_USERS)
61 #include "chrome/browser/managed_mode/managed_user_service.h"
62 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
63 #endif
64
60 #if defined(ENABLE_PRINTING) 65 #if defined(ENABLE_PRINTING)
61 #include "chrome/browser/printing/print_preview_message_handler.h" 66 #include "chrome/browser/printing/print_preview_message_handler.h"
62 #include "chrome/browser/printing/print_view_manager.h" 67 #include "chrome/browser/printing/print_view_manager.h"
63 #endif 68 #endif
64 69
65 #if defined(ENABLE_ONE_CLICK_SIGNIN) 70 #if defined(ENABLE_ONE_CLICK_SIGNIN)
66 #include "chrome/browser/ui/sync/one_click_signin_helper.h" 71 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
67 #endif 72 #endif
68 73
69 #if defined(OS_WIN) 74 #if defined(OS_WIN)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 WebContentsModalDialogManager::CreateForWebContents(web_contents); 129 WebContentsModalDialogManager::CreateForWebContents(web_contents);
125 CoreTabHelper::CreateForWebContents(web_contents); 130 CoreTabHelper::CreateForWebContents(web_contents);
126 extensions::TabHelper::CreateForWebContents(web_contents); 131 extensions::TabHelper::CreateForWebContents(web_contents);
127 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); 132 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents);
128 ExternalProtocolObserver::CreateForWebContents(web_contents); 133 ExternalProtocolObserver::CreateForWebContents(web_contents);
129 FaviconTabHelper::CreateForWebContents(web_contents); 134 FaviconTabHelper::CreateForWebContents(web_contents);
130 FindTabHelper::CreateForWebContents(web_contents); 135 FindTabHelper::CreateForWebContents(web_contents);
131 HistoryTabHelper::CreateForWebContents(web_contents); 136 HistoryTabHelper::CreateForWebContents(web_contents);
132 HungPluginTabHelper::CreateForWebContents(web_contents); 137 HungPluginTabHelper::CreateForWebContents(web_contents);
133 InfoBarService::CreateForWebContents(web_contents); 138 InfoBarService::CreateForWebContents(web_contents);
134 ManagedModeNavigationObserver::CreateForWebContents(web_contents);
135 NavigationMetricsRecorder::CreateForWebContents(web_contents); 139 NavigationMetricsRecorder::CreateForWebContents(web_contents);
136 if (OmniboxSearchHint::IsEnabled(profile)) 140 if (OmniboxSearchHint::IsEnabled(profile))
137 OmniboxSearchHint::CreateForWebContents(web_contents); 141 OmniboxSearchHint::CreateForWebContents(web_contents);
138 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); 142 PasswordManagerDelegateImpl::CreateForWebContents(web_contents);
139 PasswordManager::CreateForWebContentsAndDelegate( 143 PasswordManager::CreateForWebContentsAndDelegate(
140 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents)); 144 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents));
141 PDFTabHelper::CreateForWebContents(web_contents); 145 PDFTabHelper::CreateForWebContents(web_contents);
142 PluginObserver::CreateForWebContents(web_contents); 146 PluginObserver::CreateForWebContents(web_contents);
143 PrefsTabHelper::CreateForWebContents(web_contents); 147 PrefsTabHelper::CreateForWebContents(web_contents);
144 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); 148 prerender::PrerenderTabHelper::CreateForWebContents(web_contents);
145 SadTabHelper::CreateForWebContents(web_contents); 149 SadTabHelper::CreateForWebContents(web_contents);
146 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); 150 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
147 SearchEngineTabHelper::CreateForWebContents(web_contents); 151 SearchEngineTabHelper::CreateForWebContents(web_contents);
148 SearchTabHelper::CreateForWebContents(web_contents); 152 SearchTabHelper::CreateForWebContents(web_contents);
149 SSLTabHelper::CreateForWebContents(web_contents); 153 SSLTabHelper::CreateForWebContents(web_contents);
150 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); 154 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
151 TabSpecificContentSettings::CreateForWebContents(web_contents); 155 TabSpecificContentSettings::CreateForWebContents(web_contents);
152 ThumbnailTabHelper::CreateForWebContents(web_contents); 156 ThumbnailTabHelper::CreateForWebContents(web_contents);
153 TranslateTabHelper::CreateForWebContents(web_contents); 157 TranslateTabHelper::CreateForWebContents(web_contents);
154 ZoomController::CreateForWebContents(web_contents); 158 ZoomController::CreateForWebContents(web_contents);
155 159
156 #if defined(ENABLE_AUTOMATION) 160 #if defined(ENABLE_AUTOMATION)
157 AutomationTabHelper::CreateForWebContents(web_contents); 161 AutomationTabHelper::CreateForWebContents(web_contents);
158 #endif 162 #endif
159 163
160 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 164 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
161 captive_portal::CaptivePortalTabHelper::CreateForWebContents(web_contents); 165 captive_portal::CaptivePortalTabHelper::CreateForWebContents(web_contents);
162 #endif 166 #endif
163 167
168 #if defined(ENABLE_MANAGED_USERS)
169 ManagedUserService* service =
170 ManagedUserServiceFactory::GetForProfile(profile);
171 if (service->ProfileIsManaged())
172 ManagedModeNavigationObserver::CreateForWebContents(web_contents);
173 #endif
174
164 #if defined(ENABLE_PRINTING) 175 #if defined(ENABLE_PRINTING)
165 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 176 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
166 printing::PrintViewManager::CreateForWebContents(web_contents); 177 printing::PrintViewManager::CreateForWebContents(web_contents);
167 #endif 178 #endif
168 179
169 #if defined(ENABLE_ONE_CLICK_SIGNIN) 180 #if defined(ENABLE_ONE_CLICK_SIGNIN)
170 // If this is not an incognito window, setup to handle one-click login. 181 // If this is not an incognito window, setup to handle one-click login.
171 // We don't want to check that the profile is already connected at this time 182 // We don't want to check that the profile is already connected at this time
172 // because the connected state may change while this tab is open. Having a 183 // because the connected state may change while this tab is open. Having a
173 // one-click signin helper attached does not cause problems if the profile 184 // one-click signin helper attached does not cause problems if the profile
174 // happens to be already connected. 185 // happens to be already connected.
175 if (OneClickSigninHelper::CanOffer(web_contents, 186 if (OneClickSigninHelper::CanOffer(web_contents,
176 OneClickSigninHelper::CAN_OFFER_FOR_ALL, 187 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
177 std::string(), 188 std::string(),
178 NULL)) { 189 NULL)) {
179 OneClickSigninHelper::CreateForWebContents(web_contents); 190 OneClickSigninHelper::CreateForWebContents(web_contents);
180 } 191 }
181 #endif 192 #endif
182 193
183 #if defined(OS_WIN) 194 #if defined(OS_WIN)
184 MetroPinTabHelper::CreateForWebContents(web_contents); 195 MetroPinTabHelper::CreateForWebContents(web_contents);
185 #endif 196 #endif
186 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698