| 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 "content/browser/net/sqlite_persistent_cookie_store.h" | 5 #include "content/browser/net/sqlite_persistent_cookie_store.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "third_party/sqlite/sqlite3.h" | 43 #include "third_party/sqlite/sqlite3.h" |
| 44 #include "url/gurl.h" | 44 #include "url/gurl.h" |
| 45 | 45 |
| 46 using base::Time; | 46 using base::Time; |
| 47 | 47 |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 // The persistent cookie store is loaded into memory on eTLD at a time. This | 50 // The persistent cookie store is loaded into memory on eTLD at a time. This |
| 51 // variable controls the delay between loading eTLDs, so as to not overload the | 51 // variable controls the delay between loading eTLDs, so as to not overload the |
| 52 // CPU or I/O with these low priority requests immediately after start up. | 52 // CPU or I/O with these low priority requests immediately after start up. |
| 53 const int kLoadDelayMilliseconds = 200; | 53 // TODO(erikchen): Investigate why setting this value to 200 causes hangs on |
| 54 // shut down. |
| 55 // http://crbug.com/448910 |
| 56 const int kLoadDelayMilliseconds = 0; |
| 54 | 57 |
| 55 } // namespace | 58 } // namespace |
| 56 | 59 |
| 57 namespace content { | 60 namespace content { |
| 58 | 61 |
| 59 // This class is designed to be shared between any client thread and the | 62 // This class is designed to be shared between any client thread and the |
| 60 // background task runner. It batches operations and commits them on a timer. | 63 // background task runner. It batches operations and commits them on a timer. |
| 61 // | 64 // |
| 62 // SQLitePersistentCookieStore::Load is called to load all cookies. It | 65 // SQLitePersistentCookieStore::Load is called to load all cookies. It |
| 63 // delegates to Backend::Load, which posts a Backend::LoadAndNotifyOnDBThread | 66 // delegates to Backend::Load, which posts a Backend::LoadAndNotifyOnDBThread |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 | 1361 |
| 1359 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1362 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1360 switches::kEnableFileCookies)) { | 1363 switches::kEnableFileCookies)) { |
| 1361 cookie_monster->SetEnableFileScheme(true); | 1364 cookie_monster->SetEnableFileScheme(true); |
| 1362 } | 1365 } |
| 1363 | 1366 |
| 1364 return cookie_monster; | 1367 return cookie_monster; |
| 1365 } | 1368 } |
| 1366 | 1369 |
| 1367 } // namespace content | 1370 } // namespace content |
| OLD | NEW |