| 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 file_manager_util::OpenActionChoiceDialog(FilePath(mount_path)); | 676 file_manager_util::OpenActionChoiceDialog(base::FilePath(mount_path)); |
| 677 } | 677 } |
| 678 | 678 |
| 679 void FileBrowserEventRouter::OnDiskAdded( | 679 void FileBrowserEventRouter::OnDiskAdded( |
| 680 const DiskMountManager::Disk* disk) { | 680 const DiskMountManager::Disk* disk) { |
| 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 682 | 682 |
| 683 VLOG(1) << "Disk added: " << disk->device_path(); | 683 VLOG(1) << "Disk added: " << disk->device_path(); |
| 684 if (disk->device_path().empty()) { | 684 if (disk->device_path().empty()) { |
| 685 VLOG(1) << "Empty system path for " << disk->device_path(); | 685 VLOG(1) << "Empty system path for " << disk->device_path(); |
| 686 return; | 686 return; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 } | 871 } |
| 872 | 872 |
| 873 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( | 873 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( |
| 874 const base::FilePath& path, | 874 const base::FilePath& path, |
| 875 const base::FilePathWatcher::Callback& callback) { | 875 const base::FilePathWatcher::Callback& callback) { |
| 876 if (is_remote_file_system_) | 876 if (is_remote_file_system_) |
| 877 return true; | 877 return true; |
| 878 | 878 |
| 879 return file_watcher_->Watch(path, false, callback); | 879 return file_watcher_->Watch(path, false, callback); |
| 880 } | 880 } |
| OLD | NEW |