Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_impl.cc

Issue 6268: Port some more parts of browser/... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698