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

Side by Side Diff: chrome/browser/sync_file_system/drive/api_util.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync_file_system/drive/api_util.h" 5 #include "chrome/browser/sync_file_system/drive/api_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 drive_service_->AddObserver(this); 178 drive_service_->AddObserver(this);
179 net::NetworkChangeNotifier::AddConnectionTypeObserver(this); 179 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
180 180
181 drive_uploader_ = drive_uploader.Pass(); 181 drive_uploader_ = drive_uploader.Pass();
182 } 182 }
183 183
184 APIUtil::~APIUtil() { 184 APIUtil::~APIUtil() {
185 DCHECK(CalledOnValidThread()); 185 DCHECK(CalledOnValidThread());
186 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); 186 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
187 drive_service_->RemoveObserver(this); 187 drive_service_->RemoveObserver(this);
188 drive_service_->CancelAll();
189 } 188 }
190 189
191 void APIUtil::AddObserver(APIUtilObserver* observer) { 190 void APIUtil::AddObserver(APIUtilObserver* observer) {
192 DCHECK(CalledOnValidThread()); 191 DCHECK(CalledOnValidThread());
193 observers_.AddObserver(observer); 192 observers_.AddObserver(observer);
194 } 193 }
195 194
196 void APIUtil::RemoveObserver(APIUtilObserver* observer) { 195 void APIUtil::RemoveObserver(APIUtilObserver* observer) {
197 DCHECK(CalledOnValidThread()); 196 DCHECK(CalledOnValidThread());
198 observers_.RemoveObserver(observer); 197 observers_.RemoveObserver(observer);
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1068 }
1070 1069
1071 std::string APIUtil::GetRootResourceId() const { 1070 std::string APIUtil::GetRootResourceId() const {
1072 if (IsDriveAPIDisabled()) 1071 if (IsDriveAPIDisabled())
1073 return drive_service_->GetRootResourceId(); 1072 return drive_service_->GetRootResourceId();
1074 return root_resource_id_; 1073 return root_resource_id_;
1075 } 1074 }
1076 1075
1077 } // namespace drive 1076 } // namespace drive
1078 } // namespace sync_file_system 1077 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/request_sender.cc ('k') | chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698