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/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (mount_info.mount_type == chromeos::MOUNT_TYPE_DEVICE && | 298 if (mount_info.mount_type == chromeos::MOUNT_TYPE_DEVICE && |
299 event_type == DiskMountManager::MOUNTING) { | 299 event_type == DiskMountManager::MOUNTING) { |
300 DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); | 300 DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); |
301 DiskMountManager::DiskMap::const_iterator disk_it = | 301 DiskMountManager::DiskMap::const_iterator disk_it = |
302 disk_mount_manager->disks().find(mount_info.source_path); | 302 disk_mount_manager->disks().find(mount_info.source_path); |
303 if (disk_it == disk_mount_manager->disks().end()) { | 303 if (disk_it == disk_mount_manager->disks().end()) { |
304 return; | 304 return; |
305 } | 305 } |
306 DiskMountManager::Disk* disk = disk_it->second; | 306 DiskMountManager::Disk* disk = disk_it->second; |
307 | 307 |
308 notifications_->ManageNotificationsOnMountCompleted( | 308 notifications_->ManageNotificationsOnMountCompleted( |
309 disk->system_path_prefix(), disk->drive_label(), disk->is_parent(), | 309 disk->system_path_prefix(), disk->drive_label(), disk->is_parent(), |
310 error_code == chromeos::MOUNT_ERROR_NONE, | 310 error_code == chromeos::MOUNT_ERROR_NONE, |
311 error_code == chromeos::MOUNT_ERROR_UNSUPPORTED_FILESYSTEM); | 311 error_code == chromeos::MOUNT_ERROR_UNSUPPORTED_FILESYSTEM); |
312 } else if (mount_info.mount_type == chromeos::MOUNT_TYPE_ARCHIVE) { | 312 } else if (mount_info.mount_type == chromeos::MOUNT_TYPE_ARCHIVE) { |
313 // Clear the "mounted" state for archive files in gdata cache | 313 // Clear the "mounted" state for archive files in gdata cache |
314 // when mounting failed or unmounting succeeded. | 314 // when mounting failed or unmounting succeeded. |
315 if ((event_type == DiskMountManager::MOUNTING) != | 315 if ((event_type == DiskMountManager::MOUNTING) != |
316 (error_code == chromeos::MOUNT_ERROR_NONE)) { | 316 (error_code == chromeos::MOUNT_ERROR_NONE)) { |
317 FilePath source_path(mount_info.source_path); | 317 FilePath source_path(mount_info.source_path); |
318 gdata::GDataSystemService* system_service = | 318 gdata::GDataSystemService* system_service = |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 return scoped_refptr<RefcountedProfileKeyedService>( | 812 return scoped_refptr<RefcountedProfileKeyedService>( |
813 new FileBrowserEventRouter(profile)); | 813 new FileBrowserEventRouter(profile)); |
814 } | 814 } |
815 | 815 |
816 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() { | 816 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() { |
817 // Explicitly and always allow this router in guest login mode. see | 817 // Explicitly and always allow this router in guest login mode. see |
818 // chrome/browser/profiles/profile_keyed_base_factory.h comment | 818 // chrome/browser/profiles/profile_keyed_base_factory.h comment |
819 // for the details. | 819 // for the details. |
820 return true; | 820 return true; |
821 } | 821 } |
OLD | NEW |