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

Unified Diff: chrome/browser/google_apis/request_registry.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google_apis/request_registry.h ('k') | chrome/browser/google_apis/request_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/request_registry.cc
diff --git a/chrome/browser/google_apis/request_registry.cc b/chrome/browser/google_apis/request_registry.cc
index e7b8f7486ea26243757bc541490d78f60427ca5e..240b388129b8bdc5451d1287825819b5c4689e1b 100644
--- a/chrome/browser/google_apis/request_registry.cc
+++ b/chrome/browser/google_apis/request_registry.cc
@@ -60,36 +60,6 @@ RequestRegistry::RequestRegistry() {
}
RequestRegistry::~RequestRegistry() {
- DCHECK(in_flight_requests_.IsEmpty());
-}
-
-void RequestRegistry::CancelAll() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- for (RequestIDMap::iterator iter(&in_flight_requests_);
- !iter.IsAtEnd();
- iter.Advance()) {
- Request* request = iter.GetCurrentValue();
- CancelRequest(request);
- // CancelRequest may immediately trigger OnRequestFinish and remove the
- // request from the map, but IDMap is designed to be safe on such remove
- // while iteration.
- }
-}
-
-bool RequestRegistry::CancelForFilePath(const base::FilePath& file_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- for (RequestIDMap::iterator iter(&in_flight_requests_);
- !iter.IsAtEnd();
- iter.Advance()) {
- Request* request = iter.GetCurrentValue();
- if (request->progress_status().file_path == file_path) {
- CancelRequest(request);
- return true;
- }
- }
- return false;
}
void RequestRegistry::CancelRequest(Request* request) {
« no previous file with comments | « chrome/browser/google_apis/request_registry.h ('k') | chrome/browser/google_apis/request_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698