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

Side by Side Diff: chrome/browser/chromeos/login/profile_auth_data.cc

Issue 2633663003: Implements strict secure cookies as the default behavior in //net (Closed)
Patch Set: Rebase on ToT Created 3 years, 10 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 (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/chromeos/login/profile_auth_data.h" 5 #include "chrome/browser/chromeos/login/profile_auth_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Assume HTTPS - since the cookies are being restored from another store, 56 // Assume HTTPS - since the cookies are being restored from another store,
57 // they have already gone through the strict secure check. 57 // they have already gone through the strict secure check.
58 GURL url(std::string(url::kHttpsScheme) + url::kStandardSchemeSeparator + 58 GURL url(std::string(url::kHttpsScheme) + url::kStandardSchemeSeparator +
59 host + "/"); 59 host + "/");
60 60
61 cookie_store->SetCookieWithDetailsAsync( 61 cookie_store->SetCookieWithDetailsAsync(
62 url, cookie.Name(), cookie.Value(), effective_domain, cookie.Path(), 62 url, cookie.Name(), cookie.Value(), effective_domain, cookie.Path(),
63 cookie.CreationDate(), cookie.ExpiryDate(), cookie.LastAccessDate(), 63 cookie.CreationDate(), cookie.ExpiryDate(), cookie.LastAccessDate(),
64 cookie.IsSecure(), cookie.IsHttpOnly(), cookie.SameSite(), 64 cookie.IsSecure(), cookie.IsHttpOnly(), cookie.SameSite(),
65 // enforce_strict_secure should have been applied on the original 65 cookie.Priority(), net::CookieStore::SetCookiesCallback());
66 // cookie, prior to import. This allows URL to be treated as an HTTPS
67 // URL, whether the cookie was set by an HTTP or HTTPS domain (Something
68 // that can't be determined by just looking at the CanonicalCookie).
69 false, cookie.Priority(), net::CookieStore::SetCookiesCallback());
70 } 66 }
71 } 67 }
72 68
73 class ProfileAuthDataTransferer { 69 class ProfileAuthDataTransferer {
74 public: 70 public:
75 ProfileAuthDataTransferer( 71 ProfileAuthDataTransferer(
76 net::URLRequestContextGetter* from_context, 72 net::URLRequestContextGetter* from_context,
77 net::URLRequestContextGetter* to_context, 73 net::URLRequestContextGetter* to_context,
78 bool transfer_auth_cookies_and_channel_ids_on_first_login, 74 bool transfer_auth_cookies_and_channel_ids_on_first_login,
79 bool transfer_saml_auth_cookies_on_subsequent_login, 75 bool transfer_saml_auth_cookies_on_subsequent_login,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 DCHECK_CURRENTLY_ON(BrowserThread::UI); 346 DCHECK_CURRENTLY_ON(BrowserThread::UI);
351 (new ProfileAuthDataTransferer( 347 (new ProfileAuthDataTransferer(
352 from_context, 348 from_context,
353 to_context, 349 to_context,
354 transfer_auth_cookies_and_channel_ids_on_first_login, 350 transfer_auth_cookies_and_channel_ids_on_first_login,
355 transfer_saml_auth_cookies_on_subsequent_login, 351 transfer_saml_auth_cookies_on_subsequent_login,
356 completion_callback))->BeginTransfer(); 352 completion_callback))->BeginTransfer();
357 } 353 }
358 354
359 } // namespace chromeos 355 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698