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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/event_router.cc

Issue 2642783003: Move more utility functions to arc_util. (Closed)
Patch Set: Revert IsIntentHelperAvailable fix. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.h"
18 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chrome/browser/app_mode/app_mode_utils.h" 20 #include "chrome/browser/app_mode/app_mode_utils.h"
21 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 21 #include "chrome/browser/chromeos/arc/arc_util.h"
22 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 22 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
23 #include "chrome/browser/chromeos/drive/file_system_util.h" 23 #include "chrome/browser/chromeos/drive/file_system_util.h"
24 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" 24 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
25 #include "chrome/browser/chromeos/file_manager/app_id.h" 25 #include "chrome/browser/chromeos/file_manager/app_id.h"
26 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" 26 #include "chrome/browser/chromeos/file_manager/fileapi_util.h"
27 #include "chrome/browser/chromeos/file_manager/open_util.h" 27 #include "chrome/browser/chromeos/file_manager/open_util.h"
28 #include "chrome/browser/chromeos/file_manager/volume_manager.h" 28 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
29 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 29 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
30 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 30 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
31 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 31 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 weak_factory_.GetWeakPtr()); 501 weak_factory_.GetWeakPtr());
502 pref_change_registrar_->Add(drive::prefs::kDisableDriveOverCellular, 502 pref_change_registrar_->Add(drive::prefs::kDisableDriveOverCellular,
503 callback); 503 callback);
504 pref_change_registrar_->Add(drive::prefs::kDisableDriveHostedFiles, callback); 504 pref_change_registrar_->Add(drive::prefs::kDisableDriveHostedFiles, callback);
505 pref_change_registrar_->Add(drive::prefs::kDisableDrive, callback); 505 pref_change_registrar_->Add(drive::prefs::kDisableDrive, callback);
506 pref_change_registrar_->Add(prefs::kSearchSuggestEnabled, callback); 506 pref_change_registrar_->Add(prefs::kSearchSuggestEnabled, callback);
507 pref_change_registrar_->Add(prefs::kUse24HourClock, callback); 507 pref_change_registrar_->Add(prefs::kUse24HourClock, callback);
508 508
509 chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this); 509 chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
510 510
511 if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) { 511 if (arc::util::IsArcAllowedForProfile(profile_)) {
512 auto* intent_helper = 512 auto* intent_helper =
513 arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>(); 513 arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>();
514 if (intent_helper) 514 if (intent_helper)
515 intent_helper->AddObserver(this); 515 intent_helper->AddObserver(this);
516 } 516 }
517 } 517 }
518 518
519 // File watch setup routines. 519 // File watch setup routines.
520 void EventRouter::AddFileWatch(const base::FilePath& local_path, 520 void EventRouter::AddFileWatch(const base::FilePath& local_path,
521 const base::FilePath& virtual_path, 521 const base::FilePath& virtual_path,
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( 1006 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting(
1007 const DispatchDirectoryChangeEventImplCallback& callback) { 1007 const DispatchDirectoryChangeEventImplCallback& callback) {
1008 dispatch_directory_change_event_impl_ = callback; 1008 dispatch_directory_change_event_impl_ = callback;
1009 } 1009 }
1010 1010
1011 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { 1011 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() {
1012 return weak_factory_.GetWeakPtr(); 1012 return weak_factory_.GetWeakPtr();
1013 } 1013 }
1014 1014
1015 } // namespace file_manager 1015 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698