Chromium Code Reviews| Index: content/browser/net/sqlite_persistent_cookie_store.cc |
| diff --git a/content/browser/net/sqlite_persistent_cookie_store.cc b/content/browser/net/sqlite_persistent_cookie_store.cc |
| index 5da609bb67f72da1a964f60e0c6f67c8d5b41b74..07c340fff1b4071c0197b79852b0fb0a93b1f1fe 100644 |
| --- a/content/browser/net/sqlite_persistent_cookie_store.cc |
| +++ b/content/browser/net/sqlite_persistent_cookie_store.cc |
| @@ -432,9 +432,13 @@ bool InitTable(sql::Connection* db) { |
| if (!db->Execute("CREATE INDEX domain ON cookies(host_key)")) |
| return false; |
| +#if defined(OS_IOS) |
|
rohitrao (ping after 24h)
2015/04/24 17:36:29
Is it worth adding a comment saying why iOS is dif
erikchen
2015/04/24 17:42:57
Done.
|
| + if (!db->Execute("CREATE INDEX is_transient ON cookies(persistent)")) { |
| +#else |
| if (!db->Execute( |
| "CREATE INDEX is_transient ON cookies(persistent) " |
| "where persistent != 1")) { |
| +#endif |
| return false; |
| } |
| @@ -981,9 +985,14 @@ bool SQLitePersistentCookieStore::Backend::EnsureDatabaseVersion() { |
| return false; |
| } |
| +#if defined(OS_IOS) |
| + if (!db_->Execute( |
| + "CREATE INDEX IF NOT EXISTS is_transient ON cookies(persistent) ")) { |
|
rohitrao (ping after 24h)
2015/04/24 17:36:29
Extra trailing whitespace in the SQL command.
erikchen
2015/04/24 17:42:57
Done.
|
| +#else |
| if (!db_->Execute( |
| - "CREATE INDEX IF NOT EXISTS is_transient ON cookies(persistent) " |
| - "where persistent != 1")) { |
| + "CREATE INDEX IF NOT EXISTS is_transient ON cookies(persistent) " |
| + "where persistent != 1")) { |
| +#endif |
| LOG(WARNING) |
| << "Unable to create index is_transient in update to version 9."; |
| return false; |