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

Unified Diff: chrome/browser/profile_resetter/brandcode_config_fetcher.cc

Issue 2784323002: MD Settings: Second try at fixing ResetSettingsHandler crash (Closed)
Patch Set: fix Created 3 years, 9 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/profile_resetter/brandcode_config_fetcher.cc
diff --git a/chrome/browser/profile_resetter/brandcode_config_fetcher.cc b/chrome/browser/profile_resetter/brandcode_config_fetcher.cc
index c381f6ce1916cabec02185c9c3c15a122cdb62aa..d8b5356c9a39ee61965ac9e3de25a57d9bb0030b 100644
--- a/chrome/browser/profile_resetter/brandcode_config_fetcher.cc
+++ b/chrome/browser/profile_resetter/brandcode_config_fetcher.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include "base/callback_helpers.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -187,12 +188,12 @@ void BrandcodeConfigFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
}
config_fetcher_.reset();
download_timer_.Stop();
- fetch_callback_.Run();
+ base::ResetAndReturn(&fetch_callback_).Run();
}
void BrandcodeConfigFetcher::OnDownloadTimeout() {
if (config_fetcher_) {
config_fetcher_.reset();
- fetch_callback_.Run();
+ base::ResetAndReturn(&fetch_callback_).Run();
}
}

Powered by Google App Engine
This is Rietveld 408576698