| OLD | NEW |
| 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 "net/extras/sqlite/sqlite_persistent_cookie_store.h" | 5 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 }; | 381 }; |
| 382 | 382 |
| 383 DBCookieSameSite CookieSameSiteToDBCookieSameSite(CookieSameSite value) { | 383 DBCookieSameSite CookieSameSiteToDBCookieSameSite(CookieSameSite value) { |
| 384 switch (value) { | 384 switch (value) { |
| 385 case CookieSameSite::NO_RESTRICTION: | 385 case CookieSameSite::NO_RESTRICTION: |
| 386 return kCookieSameSiteNoRestriction; | 386 return kCookieSameSiteNoRestriction; |
| 387 case CookieSameSite::LAX_MODE: | 387 case CookieSameSite::LAX_MODE: |
| 388 return kCookieSameSiteLax; | 388 return kCookieSameSiteLax; |
| 389 case CookieSameSite::STRICT_MODE: | 389 case CookieSameSite::STRICT_MODE: |
| 390 return kCookieSameSiteStrict; | 390 return kCookieSameSiteStrict; |
| 391 case CookieSameSite::INVALID_MODE: |
| 392 NOTREACHED(); |
| 393 return kCookieSameSiteStrict; |
| 391 } | 394 } |
| 392 | 395 |
| 393 NOTREACHED(); | 396 NOTREACHED(); |
| 394 return kCookieSameSiteNoRestriction; | 397 return kCookieSameSiteNoRestriction; |
| 395 } | 398 } |
| 396 | 399 |
| 397 CookieSameSite DBCookieSameSiteToCookieSameSite(DBCookieSameSite value) { | 400 CookieSameSite DBCookieSameSiteToCookieSameSite(DBCookieSameSite value) { |
| 398 switch (value) { | 401 switch (value) { |
| 399 case kCookieSameSiteNoRestriction: | 402 case kCookieSameSiteNoRestriction: |
| 400 return CookieSameSite::NO_RESTRICTION; | 403 return CookieSameSite::NO_RESTRICTION; |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1440 void SQLitePersistentCookieStore::Flush(const base::Closure& callback) { | 1443 void SQLitePersistentCookieStore::Flush(const base::Closure& callback) { |
| 1441 if (backend_) | 1444 if (backend_) |
| 1442 backend_->Flush(callback); | 1445 backend_->Flush(callback); |
| 1443 } | 1446 } |
| 1444 | 1447 |
| 1445 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { | 1448 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { |
| 1446 Close(base::Closure()); | 1449 Close(base::Closure()); |
| 1447 } | 1450 } |
| 1448 | 1451 |
| 1449 } // namespace net | 1452 } // namespace net |
| OLD | NEW |