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

Side by Side Diff: chrome/browser/chromeos/contacts/gdata_contacts_service.cc

Issue 17385023: Get rid of RequestRegistry (part 2): remove cancellation methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused methods in RequestRegisty Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/job_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h" 5 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 std::vector<std::string> scopes; 864 std::vector<std::string> scopes;
865 scopes.push_back(kContactsScope); 865 scopes.push_back(kContactsScope);
866 sender_.reset(new google_apis::RequestSender(profile, 866 sender_.reset(new google_apis::RequestSender(profile,
867 url_request_context_getter_, 867 url_request_context_getter_,
868 scopes, 868 scopes,
869 "" /* custom_user_agent */)); 869 "" /* custom_user_agent */));
870 } 870 }
871 871
872 GDataContactsService::~GDataContactsService() { 872 GDataContactsService::~GDataContactsService() {
873 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 873 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
874 sender_->CancelAll();
875 STLDeleteContainerPointers(requests_.begin(), requests_.end()); 874 STLDeleteContainerPointers(requests_.begin(), requests_.end());
876 requests_.clear(); 875 requests_.clear();
877 } 876 }
878 877
879 google_apis::AuthService* GDataContactsService::auth_service_for_testing() { 878 google_apis::AuthService* GDataContactsService::auth_service_for_testing() {
880 return sender_->auth_service(); 879 return sender_->auth_service();
881 } 880 }
882 881
883 void GDataContactsService::Initialize() { 882 void GDataContactsService::Initialize() {
884 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 883 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 20 matching lines...) Expand all
905 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 904 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
906 DCHECK(request); 905 DCHECK(request);
907 VLOG(1) << "Download request " << request << " complete"; 906 VLOG(1) << "Download request " << request << " complete";
908 if (!request->my_contacts_group_id().empty()) 907 if (!request->my_contacts_group_id().empty())
909 cached_my_contacts_group_id_ = request->my_contacts_group_id(); 908 cached_my_contacts_group_id_ = request->my_contacts_group_id();
910 requests_.erase(request); 909 requests_.erase(request);
911 delete request; 910 delete request;
912 } 911 }
913 912
914 } // namespace contacts 913 } // namespace contacts
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/job_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698