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

Side by Side Diff: ios/chrome/browser/tabs/tab_helper_util.mm

Issue 2694333002: Fix leaking page visits in incognito mode via bookmarked favicons (Closed)
Patch Set: Rebased Created 3 years, 3 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
« no previous file with comments | « ios/chrome/browser/reading_list/reading_list_download_service_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/chrome/browser/tabs/tab_helper_util.h" 5 #import "ios/chrome/browser/tabs/tab_helper_util.h"
6 6
7 #if !defined(__has_feature) || !__has_feature(objc_arc) 7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support." 8 #error "This file requires ARC support."
9 #endif 9 #endif
10 10
11 #import "components/favicon/ios/web_favicon_driver.h" 11 #import "components/favicon/ios/web_favicon_driver.h"
12 #include "components/history/core/browser/top_sites.h" 12 #include "components/history/core/browser/top_sites.h"
13 #import "components/history/ios/browser/web_state_top_sites_observer.h" 13 #import "components/history/ios/browser/web_state_top_sites_observer.h"
14 #include "components/keyed_service/core/service_access_type.h" 14 #include "components/keyed_service/core/service_access_type.h"
15 #import "components/signin/ios/browser/account_consistency_service.h" 15 #import "components/signin/ios/browser/account_consistency_service.h"
16 #import "ios/chrome/browser/autofill/autofill_tab_helper.h" 16 #import "ios/chrome/browser/autofill/autofill_tab_helper.h"
17 #import "ios/chrome/browser/autofill/form_input_accessory_view_tab_helper.h" 17 #import "ios/chrome/browser/autofill/form_input_accessory_view_tab_helper.h"
18 #import "ios/chrome/browser/autofill/form_suggestion_tab_helper.h" 18 #import "ios/chrome/browser/autofill/form_suggestion_tab_helper.h"
19 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h"
20 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 19 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
21 #include "ios/chrome/browser/favicon/favicon_service_factory.h" 20 #include "ios/chrome/browser/favicon/favicon_service_factory.h"
22 #import "ios/chrome/browser/find_in_page/find_tab_helper.h" 21 #import "ios/chrome/browser/find_in_page/find_tab_helper.h"
23 #include "ios/chrome/browser/history/history_service_factory.h" 22 #include "ios/chrome/browser/history/history_service_factory.h"
24 #include "ios/chrome/browser/history/top_sites_factory.h" 23 #include "ios/chrome/browser/history/top_sites_factory.h"
25 #import "ios/chrome/browser/infobars/infobar_manager_impl.h" 24 #import "ios/chrome/browser/infobars/infobar_manager_impl.h"
26 #import "ios/chrome/browser/passwords/password_tab_helper.h" 25 #import "ios/chrome/browser/passwords/password_tab_helper.h"
27 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h" 26 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h"
28 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" 27 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h"
29 #import "ios/chrome/browser/reading_list/reading_list_web_state_observer.h" 28 #import "ios/chrome/browser/reading_list/reading_list_web_state_observer.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 81 }
83 ChromeIOSTranslateClient::CreateForWebState(web_state); 82 ChromeIOSTranslateClient::CreateForWebState(web_state);
84 83
85 ios::ChromeBrowserState* original_browser_state = 84 ios::ChromeBrowserState* original_browser_state =
86 browser_state->GetOriginalChromeBrowserState(); 85 browser_state->GetOriginalChromeBrowserState();
87 favicon::WebFaviconDriver::CreateForWebState( 86 favicon::WebFaviconDriver::CreateForWebState(
88 web_state, 87 web_state,
89 ios::FaviconServiceFactory::GetForBrowserState( 88 ios::FaviconServiceFactory::GetForBrowserState(
90 original_browser_state, ServiceAccessType::IMPLICIT_ACCESS), 89 original_browser_state, ServiceAccessType::IMPLICIT_ACCESS),
91 ios::HistoryServiceFactory::GetForBrowserState( 90 ios::HistoryServiceFactory::GetForBrowserState(
92 original_browser_state, ServiceAccessType::IMPLICIT_ACCESS), 91 original_browser_state, ServiceAccessType::IMPLICIT_ACCESS));
93 ios::BookmarkModelFactory::GetForBrowserState(original_browser_state));
94 history::WebStateTopSitesObserver::CreateForWebState( 92 history::WebStateTopSitesObserver::CreateForWebState(
95 web_state, 93 web_state,
96 ios::TopSitesFactory::GetForBrowserState(original_browser_state).get()); 94 ios::TopSitesFactory::GetForBrowserState(original_browser_state).get());
97 95
98 PasswordTabHelper::CreateForWebState(web_state, 96 PasswordTabHelper::CreateForWebState(web_state,
99 [[PasswordsUiDelegateImpl alloc] init]); 97 [[PasswordsUiDelegateImpl alloc] init]);
100 98
101 AutofillTabHelper::CreateForWebState( 99 AutofillTabHelper::CreateForWebState(
102 web_state, PasswordTabHelper::FromWebState(web_state) 100 web_state, PasswordTabHelper::FromWebState(web_state)
103 ->GetPasswordGenerationManager()); 101 ->GetPasswordGenerationManager());
(...skipping 19 matching lines...) Expand all
123 ]); 121 ]);
124 } 122 }
125 123
126 // Allow the embedder to attach tab helpers. 124 // Allow the embedder to attach tab helpers.
127 ios::GetChromeBrowserProvider()->AttachTabHelpers(web_state, tab); 125 ios::GetChromeBrowserProvider()->AttachTabHelpers(web_state, tab);
128 126
129 // Allow the Tab to attach tab helper like objects (all those objects should 127 // Allow the Tab to attach tab helper like objects (all those objects should
130 // really be tab helpers and created above). 128 // really be tab helpers and created above).
131 [tab attachTabHelpers]; 129 [tab attachTabHelpers];
132 } 130 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/reading_list/reading_list_download_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698