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

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

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Address 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.cc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
index 79be422c34d293381368a8a5948180168c4de701..46687431e3afcac62eb91ef5618c173a7eeede4a 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/optional.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "chrome/browser/chromeos/arc/arc_util.h"
#include "components/arc/arc_bridge_service.h"
#include "content/public/browser/browser_thread.h"
#include "url/gurl.h"
@@ -161,8 +162,11 @@ void ArcFileSystemOperationRunner::OnInstanceClosed() {
void ArcFileSystemOperationRunner::OnStateChanged() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- SetShouldDefer(ArcSessionManager::Get()->IsArcPlayStoreEnabled() &&
- !arc_bridge_service()->file_system()->has_instance());
+ // TODO(hidehiko): Revisit the condition, when ARC is running without
+ // profile.
+ SetShouldDefer(
+ IsArcPlayStoreEnabledForProfile(ArcSessionManager::Get()->profile()) &&
+ !arc_bridge_service()->file_system()->has_instance());
}
void ArcFileSystemOperationRunner::SetShouldDefer(bool should_defer) {
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util_unittest.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698