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

Unified Diff: ios/chrome/app/main_controller.mm

Issue 2596653003: [ios] Removed CookieStoreIOS::SetCookiePolicy. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/app/app_delegate.mm ('k') | ios/chrome/app/steps/launch_to_foreground.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/main_controller.mm
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm
index fa6b767e738bfb702c5823a6613f363274a00263..a2ac1bc729959442a7b11763fff9a8e968769aeb 100644
--- a/ios/chrome/app/main_controller.mm
+++ b/ios/chrome/app/main_controller.mm
@@ -488,8 +488,6 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO };
- (void)markEulaAsAccepted;
// Sends any feedback that happens to still be on local storage.
- (void)sendQueuedFeedback;
-// Sets the iOS cookie policy to match that of the given browser state.
-- (void)setInitialCookiesPolicy:(ios::ChromeBrowserState*)browserState;
// Called whenever an orientation change is received.
- (void)orientationDidChange:(NSNotification*)notification;
// Register to receive orientation change notification to update breakpad
@@ -790,7 +788,6 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO };
- (void)initializeBrowserState:(ios::ChromeBrowserState*)browserState {
DCHECK(!browserState->IsOffTheRecord());
- [self setInitialCookiesPolicy:browserState];
search_engines::UpdateSearchEnginesIfNeeded(
browserState->GetPrefs(),
ios::TemplateURLServiceFactory::GetForBrowserState(browserState));
@@ -1046,43 +1043,6 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO };
}];
}
-- (void)setInitialCookiesPolicy:(ios::ChromeBrowserState*)browserState {
- DCHECK(browserState);
- net::CookieStoreIOS::CookiePolicy policy = net::CookieStoreIOS::BLOCK;
-
- auto settingsFactory =
- ios::HostContentSettingsMapFactory::GetForBrowserState(browserState);
- DCHECK(settingsFactory);
- ContentSetting cookieSetting = settingsFactory->GetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_COOKIES, nullptr);
-
- if (!web::IsAcceptCookieControlSupported()) {
- // Override the Accept Cookie policy as ALLOW is the only policy
- // supported by //web.
- policy = net::CookieStoreIOS::ALLOW;
- if (cookieSetting == CONTENT_SETTING_BLOCK) {
- settingsFactory->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES,
- CONTENT_SETTING_ALLOW);
- }
- } else {
- switch (cookieSetting) {
- case CONTENT_SETTING_ALLOW:
- policy = net::CookieStoreIOS::ALLOW;
- break;
- case CONTENT_SETTING_BLOCK:
- policy = net::CookieStoreIOS::BLOCK;
- break;
- default:
- NOTREACHED() << "Unsupported cookie policy.";
- break;
- }
- }
-
- web::WebThread::PostTask(
- web::WebThread::IO, FROM_HERE,
- base::Bind(&net::CookieStoreIOS::SetCookiePolicy, policy));
-}
-
- (void)orientationDidChange:(NSNotification*)notification {
breakpad_helper::SetCurrentOrientation(
[[UIApplication sharedApplication] statusBarOrientation],
« no previous file with comments | « ios/chrome/app/app_delegate.mm ('k') | ios/chrome/app/steps/launch_to_foreground.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698