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

Unified Diff: chrome/browser/chromeos/file_system_provider/request_manager.cc

Issue 440653003: [fsp] Add support for aborting running operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed DCHECKs. Created 6 years, 4 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
Index: chrome/browser/chromeos/file_system_provider/request_manager.cc
diff --git a/chrome/browser/chromeos/file_system_provider/request_manager.cc b/chrome/browser/chromeos/file_system_provider/request_manager.cc
index b107ebdbdd56339b5916cc7fb50e6c4f5bf2a50e..11c871bf196e6dcc282152caa79e700ed788f3b5 100644
--- a/chrome/browser/chromeos/file_system_provider/request_manager.cc
+++ b/chrome/browser/chromeos/file_system_provider/request_manager.cc
@@ -46,6 +46,8 @@ std::string RequestTypeToString(RequestType type) {
return "TRUNCATE";
case WRITE_FILE:
return "WRITE_FILE";
+ case ABORT:
+ return "ABORT";
case TESTING:
return "TESTING";
}
@@ -159,8 +161,16 @@ void RequestManager::SetTimeoutForTesting(const base::TimeDelta& timeout) {
timeout_ = timeout;
}
-size_t RequestManager::GetActiveRequestsForLogging() const {
- return requests_.size();
+std::vector<int> RequestManager::GetActiveRequestIds() const {
+ std::vector<int> result;
+
+ for (RequestMap::const_iterator request_it = requests_.begin();
+ request_it != requests_.end();
+ ++request_it) {
+ result.push_back(request_it->first);
+ }
+
+ return result;
}
void RequestManager::AddObserver(Observer* observer) {

Powered by Google App Engine
This is Rietveld 408576698