| Index: chrome/browser/safe_browsing/safe_browsing_database_impl.cc
|
| ===================================================================
|
| --- chrome/browser/safe_browsing/safe_browsing_database_impl.cc (revision 3500)
|
| +++ chrome/browser/safe_browsing/safe_browsing_database_impl.cc (working copy)
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "chrome/browser/safe_browsing/safe_browsing_database_impl.h"
|
|
|
| +#include "base/compiler_specific.h"
|
| #include "base/file_util.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop.h"
|
| +#include "base/platform_thread.h"
|
| #include "base/sha2.h"
|
| #include "base/string_util.h"
|
| #include "chrome/browser/safe_browsing/bloom_filter.h"
|
| @@ -56,20 +58,15 @@
|
|
|
| SafeBrowsingDatabaseImpl::SafeBrowsingDatabaseImpl()
|
| : db_(NULL),
|
| - init_(false),
|
| transaction_count_(0),
|
| + init_(false),
|
| asynchronous_(true),
|
| chunk_inserted_callback_(NULL),
|
| -#pragma warning(suppress: 4355) // can use this
|
| - bloom_read_factory_(this),
|
| -#pragma warning(suppress: 4355) // can use this
|
| - bloom_write_factory_(this),
|
| -#pragma warning(suppress: 4355) // can use this
|
| - process_factory_(this),
|
| -#pragma warning(suppress: 4355) // can use this
|
| - reset_factory_(this),
|
| -#pragma warning(suppress: 4355) // can use this
|
| - resume_factory_(this),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(process_factory_(this)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(bloom_read_factory_(this)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(bloom_write_factory_(this)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(reset_factory_(this)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(resume_factory_(this)),
|
| disk_delay_(kMaxThreadHoldupMs) {
|
| }
|
|
|
| @@ -473,7 +470,7 @@
|
| &SafeBrowsingDatabaseImpl::RunThrottledWork), disk_delay_);
|
| break;
|
| } else {
|
| - Sleep(kMaxThreadHoldupMs);
|
| + PlatformThread::Sleep(kMaxThreadHoldupMs);
|
| }
|
| }
|
| }
|
| @@ -1014,7 +1011,7 @@
|
| if (asynchronous_) {
|
| break;
|
| } else {
|
| - Sleep(kMaxThreadHoldupMs);
|
| + PlatformThread::Sleep(kMaxThreadHoldupMs);
|
| }
|
| }
|
| }
|
| @@ -1180,7 +1177,7 @@
|
| ++eit;
|
| }
|
| if (entries.empty())
|
| - it = hash_cache_.erase(it);
|
| + hash_cache_.erase(it++);
|
| else
|
| ++it;
|
| }
|
|
|