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

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

Issue 2850373002: Make ChromeSubresourceFilterClient a WebContentsUserData (Closed)
Patch Set: rebase Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 g_browser_process->GetApplicationLocale(), 167 g_browser_process->GetApplicationLocale(),
168 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); 168 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
169 BookmarkLastVisitUpdater::MaybeCreateForWebContentsWithBookmarkModel( 169 BookmarkLastVisitUpdater::MaybeCreateForWebContentsWithBookmarkModel(
170 web_contents, BookmarkModelFactory::GetForBrowserContext( 170 web_contents, BookmarkModelFactory::GetForBrowserContext(
171 web_contents->GetBrowserContext())); 171 web_contents->GetBrowserContext()));
172 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); 172 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents);
173 chrome_browser_net::PredictorTabHelper::CreateForWebContents(web_contents); 173 chrome_browser_net::PredictorTabHelper::CreateForWebContents(web_contents);
174 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( 174 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
175 web_contents, 175 web_contents,
176 autofill::ChromeAutofillClient::FromWebContents(web_contents)); 176 autofill::ChromeAutofillClient::FromWebContents(web_contents));
177 ChromeSubresourceFilterClient::CreateForWebContents(web_contents);
177 ChromeTranslateClient::CreateForWebContents(web_contents); 178 ChromeTranslateClient::CreateForWebContents(web_contents);
178 CoreTabHelper::CreateForWebContents(web_contents); 179 CoreTabHelper::CreateForWebContents(web_contents);
179 data_use_measurement::DataUseWebContentsObserver::CreateForWebContents( 180 data_use_measurement::DataUseWebContentsObserver::CreateForWebContents(
180 web_contents); 181 web_contents);
181 ExternalProtocolObserver::CreateForWebContents(web_contents); 182 ExternalProtocolObserver::CreateForWebContents(web_contents);
182 favicon::CreateContentFaviconDriverForWebContents(web_contents); 183 favicon::CreateContentFaviconDriverForWebContents(web_contents);
183 FindTabHelper::CreateForWebContents(web_contents); 184 FindTabHelper::CreateForWebContents(web_contents);
184 history::WebContentsTopSitesObserver::CreateForWebContents( 185 history::WebContentsTopSitesObserver::CreateForWebContents(
185 web_contents, TopSitesFactory::GetForProfile( 186 web_contents, TopSitesFactory::GetForProfile(
186 Profile::FromBrowserContext( 187 Profile::FromBrowserContext(
(...skipping 10 matching lines...) Expand all
197 PermissionRequestManager::CreateForWebContents(web_contents); 198 PermissionRequestManager::CreateForWebContents(web_contents);
198 PopupBlockerTabHelper::CreateForWebContents(web_contents); 199 PopupBlockerTabHelper::CreateForWebContents(web_contents);
199 PrefsTabHelper::CreateForWebContents(web_contents); 200 PrefsTabHelper::CreateForWebContents(web_contents);
200 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); 201 prerender::PrerenderTabHelper::CreateForWebContents(web_contents);
201 PreviewsInfoBarTabHelper::CreateForWebContents(web_contents); 202 PreviewsInfoBarTabHelper::CreateForWebContents(web_contents);
202 SearchTabHelper::CreateForWebContents(web_contents); 203 SearchTabHelper::CreateForWebContents(web_contents);
203 SearchEngineTabHelper::CreateForWebContents(web_contents); 204 SearchEngineTabHelper::CreateForWebContents(web_contents);
204 SecurityStateTabHelper::CreateForWebContents(web_contents); 205 SecurityStateTabHelper::CreateForWebContents(web_contents);
205 if (SiteEngagementService::IsEnabled()) 206 if (SiteEngagementService::IsEnabled())
206 SiteEngagementService::Helper::CreateForWebContents(web_contents); 207 SiteEngagementService::Helper::CreateForWebContents(web_contents);
207 std::unique_ptr<ChromeSubresourceFilterClient> subresource_filter_client(
208 new ChromeSubresourceFilterClient(web_contents));
209 subresource_filter::ContentSubresourceFilterDriverFactory::
210 CreateForWebContents(web_contents, std::move(subresource_filter_client));
211 sync_sessions::SyncSessionsRouterTabHelper::CreateForWebContents( 208 sync_sessions::SyncSessionsRouterTabHelper::CreateForWebContents(
212 web_contents, 209 web_contents,
213 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile( 210 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile(
214 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); 211 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
215 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 212 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
216 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 213 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
217 TabSpecificContentSettings::CreateForWebContents(web_contents); 214 TabSpecificContentSettings::CreateForWebContents(web_contents);
218 215
219 // NO! Do not just add your tab helper here. This is a large alphabetized 216 // NO! Do not just add your tab helper here. This is a large alphabetized
220 // block; please insert your tab helper above in alphabetical order. 217 // block; please insert your tab helper above in alphabetical order.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 292
296 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 293 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
297 web_contents->GetBrowserContext())) { 294 web_contents->GetBrowserContext())) {
298 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 295 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
299 web_contents); 296 web_contents);
300 } 297 }
301 298
302 if (tracing::NavigationTracingObserver::IsEnabled()) 299 if (tracing::NavigationTracingObserver::IsEnabled())
303 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 300 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
304 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698