OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_browser_event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
666 } | 666 } |
667 | 667 |
668 void FileBrowserEventRouter::ShowRemovableDeviceInFileManager( | 668 void FileBrowserEventRouter::ShowRemovableDeviceInFileManager( |
669 const std::string& mount_path) { | 669 const std::string& mount_path) { |
670 // Do not attempt to open File Manager while the login is in progress or | 670 // Do not attempt to open File Manager while the login is in progress or |
671 // the screen is locked. | 671 // the screen is locked. |
672 if (chromeos::BaseLoginDisplayHost::default_host() || | 672 if (chromeos::BaseLoginDisplayHost::default_host() || |
673 chromeos::ScreenLocker::default_screen_locker()) | 673 chromeos::ScreenLocker::default_screen_locker()) |
674 return; | 674 return; |
675 | 675 |
676 // To enable Photo Import call file_manager_util::OpenActionChoiceDialog | 676 file_manager_util::OpenActionChoiceDialog(FilePath(mount_path)); |
hashimoto
2013/02/14 08:30:18
nit: It seems no one uses ViewRemovableDrive after
mtomasz
2013/02/14 08:43:39
I'm going to use it in m27. The loader will not be
hashimoto
2013/02/14 08:46:37
OK, sgtm.
| |
677 // instead. | |
678 file_manager_util::ViewRemovableDrive(base::FilePath(mount_path)); | |
679 } | 677 } |
680 | 678 |
681 void FileBrowserEventRouter::OnDiskAdded( | 679 void FileBrowserEventRouter::OnDiskAdded( |
682 const DiskMountManager::Disk* disk) { | 680 const DiskMountManager::Disk* disk) { |
683 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
684 | 682 |
685 VLOG(1) << "Disk added: " << disk->device_path(); | 683 VLOG(1) << "Disk added: " << disk->device_path(); |
686 if (disk->device_path().empty()) { | 684 if (disk->device_path().empty()) { |
687 VLOG(1) << "Empty system path for " << disk->device_path(); | 685 VLOG(1) << "Empty system path for " << disk->device_path(); |
688 return; | 686 return; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
873 } | 871 } |
874 | 872 |
875 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( | 873 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( |
876 const base::FilePath& path, | 874 const base::FilePath& path, |
877 const base::FilePathWatcher::Callback& callback) { | 875 const base::FilePathWatcher::Callback& callback) { |
878 if (is_remote_file_system_) | 876 if (is_remote_file_system_) |
879 return true; | 877 return true; |
880 | 878 |
881 return file_watcher_->Watch(path, false, callback); | 879 return file_watcher_->Watch(path, false, callback); |
882 } | 880 } |
OLD | NEW |