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

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

Issue 350683002: [fsp] Add notifications in case of slow operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang. Created 6 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
Index: chrome/browser/chromeos/file_system_provider/request_manager.h
diff --git a/chrome/browser/chromeos/file_system_provider/request_manager.h b/chrome/browser/chromeos/file_system_provider/request_manager.h
index 4518bfa76e283d23ab84d3babf5ebbc636a20d79..eeea270bdde71cdbd0ef6d02b1d4ab4f1dbc69b6 100644
--- a/chrome/browser/chromeos/file_system_provider/request_manager.h
+++ b/chrome/browser/chromeos/file_system_provider/request_manager.h
@@ -15,6 +15,7 @@
#include "base/observer_list.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "chrome/browser/chromeos/file_system_provider/notification_manager_interface.h"
#include "chrome/browser/chromeos/file_system_provider/provided_file_system_info.h"
#include "chrome/browser/chromeos/file_system_provider/request_value.h"
@@ -88,7 +89,7 @@ class RequestManager {
virtual void OnRequestTimeouted(int request_id) = 0;
};
- RequestManager();
+ explicit RequestManager(NotificationManagerInterface* notification_manager);
virtual ~RequestManager();
// Creates a request and returns its request id (greater than 0). Returns 0 in
@@ -144,7 +145,17 @@ class RequestManager {
// Called when a request with |request_id| timeouts.
void OnRequestTimeout(int request_id);
+ // Called when an user either aborts the unresponsive request or lets it
+ // continue.
+ void OnUnresponsiveNotificationResult(
+ int request_id,
+ NotificationManagerInterface::NotificationResult result);
+
+ // Resets the timeout timer for the specified request.
+ void ResetTimer(int request_id);
+
RequestMap requests_;
+ NotificationManagerInterface* notification_manager_; // Not owned.
int next_id_;
base::TimeDelta timeout_;
base::WeakPtrFactory<RequestManager> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698