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

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

Issue 63923002: net: Use SequencedTaskRunner for URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add include Created 7 years, 1 month 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/drive/drive_api_service.h » ('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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 848
849 GDataContactsService::GDataContactsService( 849 GDataContactsService::GDataContactsService(
850 net::URLRequestContextGetter* url_request_context_getter, 850 net::URLRequestContextGetter* url_request_context_getter,
851 google_apis::AuthServiceInterface* auth_service) 851 google_apis::AuthServiceInterface* auth_service)
852 : max_photo_downloads_per_second_(kMaxPhotoDownloadsPerSecond), 852 : max_photo_downloads_per_second_(kMaxPhotoDownloadsPerSecond),
853 photo_download_timer_interval_(base::TimeDelta::FromSeconds(1)) { 853 photo_download_timer_interval_(base::TimeDelta::FromSeconds(1)) {
854 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 854 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
855 sender_.reset(new google_apis::RequestSender( 855 sender_.reset(new google_apis::RequestSender(
856 auth_service, 856 auth_service,
857 url_request_context_getter, 857 url_request_context_getter,
858 content::BrowserThread::GetBlockingPool(), 858 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
859 BrowserThread::GetBlockingPool()->GetSequenceToken()).get(),
satorux1 2013/11/11 07:43:14 looks verbose, but looks it's necessary...
859 "" /* custom_user_agent */)); 860 "" /* custom_user_agent */));
860 } 861 }
861 862
862 GDataContactsService::~GDataContactsService() { 863 GDataContactsService::~GDataContactsService() {
863 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 864 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
864 STLDeleteContainerPointers(requests_.begin(), requests_.end()); 865 STLDeleteContainerPointers(requests_.begin(), requests_.end());
865 requests_.clear(); 866 requests_.clear();
866 } 867 }
867 868
868 void GDataContactsService::DownloadContacts(SuccessCallback success_callback, 869 void GDataContactsService::DownloadContacts(SuccessCallback success_callback,
(...skipping 15 matching lines...) Expand all
884 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
885 DCHECK(request); 886 DCHECK(request);
886 VLOG(1) << "Download request " << request << " complete"; 887 VLOG(1) << "Download request " << request << " complete";
887 if (!request->my_contacts_group_id().empty()) 888 if (!request->my_contacts_group_id().empty())
888 cached_my_contacts_group_id_ = request->my_contacts_group_id(); 889 cached_my_contacts_group_id_ = request->my_contacts_group_id();
889 requests_.erase(request); 890 requests_.erase(request);
890 delete request; 891 delete request;
891 } 892 }
892 893
893 } // namespace contacts 894 } // namespace contacts
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/drive/drive_api_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698