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

Side by Side Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 10911242: make media gallery directory tooltips in media gallery config dialog absolute paths (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: +! Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/media_gallery/media_galleries_preferences.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // MediaFileSystemRegistry implementation. 5 // MediaFileSystemRegistry implementation.
6 6
7 #include "chrome/browser/media_gallery/media_file_system_registry.h" 7 #include "chrome/browser/media_gallery/media_file_system_registry.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 continue; 286 continue;
287 287
288 PrefIdFsInfoMap::const_iterator existing_info = 288 PrefIdFsInfoMap::const_iterator existing_info =
289 pref_id_map_.find(*pref_id_it); 289 pref_id_map_.find(*pref_id_it);
290 if (existing_info != pref_id_map_.end()) { 290 if (existing_info != pref_id_map_.end()) {
291 result.push_back(existing_info->second); 291 result.push_back(existing_info->second);
292 new_galleries.insert(*pref_id_it); 292 new_galleries.insert(*pref_id_it);
293 continue; 293 continue;
294 } 294 }
295 295
296 FilePath path = MediaStorageUtil::FindDevicePathById(device_id); 296 FilePath path = gallery_info.AbsolutePath();
297 if (path.empty()) 297 if (!path.IsAbsolute())
298 continue; 298 continue;
299 path = path.Append(gallery_info.path);
300 299
301 std::string fsid; 300 std::string fsid;
302 if (MediaStorageUtil::IsMassStorageDevice(device_id)) { 301 if (MediaStorageUtil::IsMassStorageDevice(device_id)) {
303 fsid = RegisterFileSystemForMassStorage(device_id, path); 302 fsid = RegisterFileSystemForMassStorage(device_id, path);
304 } else { 303 } else {
305 #if defined(SUPPORT_MEDIA_FILESYSTEM) 304 #if defined(SUPPORT_MEDIA_FILESYSTEM)
306 scoped_refptr<ScopedMediaDeviceMapEntry> mtp_device_host; 305 scoped_refptr<ScopedMediaDeviceMapEntry> mtp_device_host;
307 fsid = registry_->RegisterFileSystemForMtpDevice( 306 fsid = registry_->RegisterFileSystemForMtpDevice(
308 device_id, path, &mtp_device_host); 307 device_id, path, &mtp_device_host);
309 DCHECK(mtp_device_host.get()); 308 DCHECK(mtp_device_host.get());
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 extension_hosts_map_.find(profile); 629 extension_hosts_map_.find(profile);
631 DCHECK(extension_hosts != extension_hosts_map_.end()); 630 DCHECK(extension_hosts != extension_hosts_map_.end());
632 ExtensionHostMap::size_type erase_count = 631 ExtensionHostMap::size_type erase_count =
633 extension_hosts->second.erase(extension_id); 632 extension_hosts->second.erase(extension_id);
634 DCHECK_EQ(1U, erase_count); 633 DCHECK_EQ(1U, erase_count);
635 if (extension_hosts->second.empty()) 634 if (extension_hosts->second.empty())
636 extension_hosts_map_.erase(extension_hosts); 635 extension_hosts_map_.erase(extension_hosts);
637 } 636 }
638 637
639 } // namespace chrome 638 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_gallery/media_galleries_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698