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

Unified Diff: content/browser/download/download_browsertest.cc

Issue 780713002: Fix remaining WeakPtrFactory ordering problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index a011fc90015f726b9dec4c7689bf01465ceb1f26..9ba699bc8f6cc9f6a4efa9e8c301c668539910f4 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -173,9 +173,9 @@ class DownloadFileWithDelayFactory : public DownloadFileFactory {
void WaitForSomeCallback();
private:
- base::WeakPtrFactory<DownloadFileWithDelayFactory> weak_ptr_factory_;
std::vector<base::Closure> rename_callbacks_;
bool waiting_;
+ base::WeakPtrFactory<DownloadFileWithDelayFactory> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DownloadFileWithDelayFactory);
};
@@ -228,8 +228,9 @@ void DownloadFileWithDelay::RenameCallbackWrapper(
}
DownloadFileWithDelayFactory::DownloadFileWithDelayFactory()
- : weak_ptr_factory_(this),
- waiting_(false) {}
+ : waiting_(false),
+ weak_ptr_factory_(this) {}
+
DownloadFileWithDelayFactory::~DownloadFileWithDelayFactory() {}
DownloadFile* DownloadFileWithDelayFactory::CreateFile(

Powered by Google App Engine
This is Rietveld 408576698