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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_bloom.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_bloom.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (revision 3500)
+++ chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (working copy)
@@ -4,9 +4,11 @@
#include "chrome/browser/safe_browsing/safe_browsing_database_bloom.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"
@@ -38,13 +40,11 @@
SafeBrowsingDatabaseBloom::SafeBrowsingDatabaseBloom()
: db_(NULL),
+ transaction_count_(0),
init_(false),
- transaction_count_(0),
chunk_inserted_callback_(NULL),
-#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(reset_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(resume_factory_(this)),
did_resume_(false) {
}
@@ -1017,7 +1017,7 @@
++eit;
}
if (entries.empty())
- it = hash_cache_.erase(it);
+ hash_cache_.erase(it++);
else
++it;
}
@@ -1049,7 +1049,7 @@
void SafeBrowsingDatabaseBloom::WaitAfterResume() {
if (did_resume_) {
- Sleep(kOnResumeHoldupMs);
+ PlatformThread::Sleep(kOnResumeHoldupMs);
did_resume_ = false;
}
}

Powered by Google App Engine
This is Rietveld 408576698