| 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 add_smt.BindBlob(4, encrypted_value.data(), | 1112 add_smt.BindBlob(4, encrypted_value.data(), |
| 1113 static_cast<int>(encrypted_value.length())); | 1113 static_cast<int>(encrypted_value.length())); |
| 1114 } else { | 1114 } else { |
| 1115 add_smt.BindString(3, po->cc().Value()); | 1115 add_smt.BindString(3, po->cc().Value()); |
| 1116 add_smt.BindBlob(4, "", 0); // encrypted_value | 1116 add_smt.BindBlob(4, "", 0); // encrypted_value |
| 1117 } | 1117 } |
| 1118 add_smt.BindString(5, po->cc().Path()); | 1118 add_smt.BindString(5, po->cc().Path()); |
| 1119 add_smt.BindInt64(6, po->cc().ExpiryDate().ToInternalValue()); | 1119 add_smt.BindInt64(6, po->cc().ExpiryDate().ToInternalValue()); |
| 1120 add_smt.BindInt(7, po->cc().IsSecure()); | 1120 add_smt.BindInt(7, po->cc().IsSecure()); |
| 1121 add_smt.BindInt(8, po->cc().IsHttpOnly()); | 1121 add_smt.BindInt(8, po->cc().IsHttpOnly()); |
| 1122 add_smt.BindInt(9, po->cc().IsFirstPartyOnly()); | 1122 add_smt.BindInt(9, po->cc().IsSameSite()); |
| 1123 add_smt.BindInt64(10, po->cc().LastAccessDate().ToInternalValue()); | 1123 add_smt.BindInt64(10, po->cc().LastAccessDate().ToInternalValue()); |
| 1124 add_smt.BindInt(11, po->cc().IsPersistent()); | 1124 add_smt.BindInt(11, po->cc().IsPersistent()); |
| 1125 add_smt.BindInt(12, po->cc().IsPersistent()); | 1125 add_smt.BindInt(12, po->cc().IsPersistent()); |
| 1126 add_smt.BindInt(13, | 1126 add_smt.BindInt(13, |
| 1127 CookiePriorityToDBCookiePriority(po->cc().Priority())); | 1127 CookiePriorityToDBCookiePriority(po->cc().Priority())); |
| 1128 if (!add_smt.Run()) | 1128 if (!add_smt.Run()) |
| 1129 NOTREACHED() << "Could not add a cookie to the DB."; | 1129 NOTREACHED() << "Could not add a cookie to the DB."; |
| 1130 break; | 1130 break; |
| 1131 | 1131 |
| 1132 case PendingOperation::COOKIE_UPDATEACCESS: | 1132 case PendingOperation::COOKIE_UPDATEACCESS: |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 void SQLitePersistentCookieStore::Flush(const base::Closure& callback) { | 1395 void SQLitePersistentCookieStore::Flush(const base::Closure& callback) { |
| 1396 if (backend_) | 1396 if (backend_) |
| 1397 backend_->Flush(callback); | 1397 backend_->Flush(callback); |
| 1398 } | 1398 } |
| 1399 | 1399 |
| 1400 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { | 1400 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { |
| 1401 Close(base::Closure()); | 1401 Close(base::Closure()); |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 } // namespace net | 1404 } // namespace net |
| OLD | NEW |