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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h

Issue 2704123007: mediaview: Fix ARC file system operation deferring. (Closed)
Patch Set: Addressed hidehiko's comments. Created 3 years, 10 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/arc/fileapi/arc_file_system_operation_runner.h
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
index 958e46254a3e4a949b55a9432ff0a3b9013899ae..65dcf5d3db57c144fc29f44ef41788f02eb0933c 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
@@ -66,7 +66,8 @@ class ArcFileSystemOperationRunner
// The standard constructor. A production instance should be created by
// this constructor.
- explicit ArcFileSystemOperationRunner(ArcBridgeService* bridge_service);
+ ArcFileSystemOperationRunner(ArcBridgeService* bridge_service,
+ const Profile* profile);
~ArcFileSystemOperationRunner() override;
// Runs file system operations. See file_system.mojom for documentation.
@@ -90,6 +91,7 @@ class ArcFileSystemOperationRunner
friend class ArcFileSystemOperationRunnerTest;
ArcFileSystemOperationRunner(ArcBridgeService* bridge_service,
+ const Profile* profile,
bool observe_events);
// Called whenever ARC states related to |should_defer_| are changed.
@@ -100,9 +102,13 @@ class ArcFileSystemOperationRunner
// deferring.
void SetShouldDefer(bool should_defer);
+ // Profile this runner is associated with. This can be nullptr in
+ // unit tests.
+ const Profile* const profile_;
+
// Indicates if this instance should register observers to receive events.
// Usually true, but set to false in unit tests.
- bool observe_events_;
+ const bool observe_events_;
// Set to true if operations should be deferred at this moment.
// The default is set to false so that operations are not deferred in

Powered by Google App Engine
This is Rietveld 408576698