| 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 // TODO(erikchen): Investigate why setting this value to 200 causes hangs on | 53 const int kLoadDelayMilliseconds = 200; |
| 54 // shut down. | |
| 55 // http://crbug.com/448910 | |
| 56 const int kLoadDelayMilliseconds = 0; | |
| 57 | 54 |
| 58 } // namespace | 55 } // namespace |
| 59 | 56 |
| 60 namespace content { | 57 namespace content { |
| 61 | 58 |
| 62 // This class is designed to be shared between any client thread and the | 59 // This class is designed to be shared between any client thread and the |
| 63 // background task runner. It batches operations and commits them on a timer. | 60 // background task runner. It batches operations and commits them on a timer. |
| 64 // | 61 // |
| 65 // SQLitePersistentCookieStore::Load is called to load all cookies. It | 62 // SQLitePersistentCookieStore::Load is called to load all cookies. It |
| 66 // delegates to Backend::Load, which posts a Backend::LoadAndNotifyOnDBThread | 63 // delegates to Backend::Load, which posts a Backend::LoadAndNotifyOnDBThread |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 | 1385 |
| 1389 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1386 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1390 switches::kEnableFileCookies)) { | 1387 switches::kEnableFileCookies)) { |
| 1391 cookie_monster->SetEnableFileScheme(true); | 1388 cookie_monster->SetEnableFileScheme(true); |
| 1392 } | 1389 } |
| 1393 | 1390 |
| 1394 return cookie_monster; | 1391 return cookie_monster; |
| 1395 } | 1392 } |
| 1396 | 1393 |
| 1397 } // namespace content | 1394 } // namespace content |
| OLD | NEW |