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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 1108053003: Fix gaia logout URLFetcher memory leak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « components/signin/core/browser/gaia_cookie_manager_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index 8adcfe191d992a7c1387a9c301b3a48a0bc0c352..36f2dd085a73e4e9fd85095f8fe28b445cddd334 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -457,10 +457,11 @@ void GaiaCookieManagerService::StartLogOutUrlFetch() {
VLOG(1) << "GaiaCookieManagerService::StartLogOutUrlFetch";
GURL logout_url(GaiaUrls::GetInstance()->service_logout_url().Resolve(
base::StringPrintf("?source=%s", source_.c_str())));
- net::URLFetcher* fetcher =
- net::URLFetcher::Create(logout_url, net::URLFetcher::GET, this);
- fetcher->SetRequestContext(signin_client_->GetURLRequestContext());
- fetcher->Start();
+ logout_url_request_.reset(
+ net::URLFetcher::Create(logout_url, net::URLFetcher::GET, this));
+ logout_url_request_->SetRequestContext(
+ signin_client_->GetURLRequestContext());
+ logout_url_request_->Start();
}
void GaiaCookieManagerService::OnUbertokenSuccess(
@@ -596,6 +597,7 @@ void GaiaCookieManagerService::OnURLFetchComplete(
const net::URLFetcher* source) {
DCHECK(requests_.front().request_type() == GaiaCookieRequestType::LOG_OUT);
VLOG(1) << "GaiaCookieManagerService::OnURLFetchComplete";
+ scoped_ptr<net::URLFetcher> logout_url_request(logout_url_request_.Pass());
if ((!source->GetStatus().is_success() ||
source->GetResponseCode() != net::HTTP_OK) &&
« no previous file with comments | « components/signin/core/browser/gaia_cookie_manager_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698