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

Unified Diff: chrome/browser/history/web_history_service.cc

Issue 14344002: Sync: Turn on full history sync by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use-after-free. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/history/web_history_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/web_history_service.cc
diff --git a/chrome/browser/history/web_history_service.cc b/chrome/browser/history/web_history_service.cc
index 5f9418e56bcdb6dc9e2c311e9a11747837e00481..45a531d8db61a010e94ac68e2a8dded03016cfe1 100644
--- a/chrome/browser/history/web_history_service.cc
+++ b/chrome/browser/history/web_history_service.cc
@@ -102,8 +102,10 @@ class RequestImpl : public WebHistoryService::Request,
}
url_fetcher_->GetResponseAsString(&response_body_);
url_fetcher_.reset();
- callback_.Run(this, true);
is_pending_ = false;
+ callback_.Run(this, true);
+ // It is valid for the callback to delete |this|, so do not access any
+ // members below here.
}
// OAuth2TokenService::Consumer interface.
@@ -124,9 +126,10 @@ class RequestImpl : public WebHistoryService::Request,
const OAuth2TokenService::Request* request,
const GoogleServiceAuthError& error) OVERRIDE {
token_request_.reset();
- LOG(WARNING) << "Failed to get OAuth token: " << error.ToString();
- callback_.Run(this, false);
is_pending_ = false;
+ callback_.Run(this, false);
+ // It is valid for the callback to delete |this|, so do not access any
+ // members below here.
}
// Helper for creating a new URLFetcher for the API request.
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/history/web_history_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698