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

Side by Side Diff: chrome/browser/system_monitor/media_storage_util.cc

Issue 11363153: [Media Gallery][Linux] Improve device media gallery names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_clang compile error Created 8 years, 1 month 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/system_monitor/removable_device_notifications_linux.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 // chrome::MediaStorageUtil implementation. 5 // chrome::MediaStorageUtil implementation.
6 6
7 #include "chrome/browser/system_monitor/media_storage_util.h" 7 #include "chrome/browser/system_monitor/media_storage_util.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 *device_id = device_info.device_id; 259 *device_id = device_info.device_id;
260 260
261 FilePath sub_folder_path; 261 FilePath sub_folder_path;
262 if (device_name || relative_path) { 262 if (device_name || relative_path) {
263 bool success = FilePath(device_info.location) 263 bool success = FilePath(device_info.location)
264 .AppendRelativePath(path, &sub_folder_path); 264 .AppendRelativePath(path, &sub_folder_path);
265 DCHECK(success); 265 DCHECK(success);
266 } 266 }
267 267
268 if (device_name) { 268 if (device_name) {
269 #if defined(OS_CHROMEOS) 269 #if defined(OS_LINUX) // Implies OS_CHROMEOS
270 *device_name = GetDisplayNameForDevice( 270 *device_name = GetDisplayNameForDevice(
271 notifier->GetStorageSize(device_info.location), 271 notifier->GetStorageSize(device_info.location),
272 sub_folder_path.value().empty() ? 272 sub_folder_path.value().empty() ?
273 device_info.name : 273 device_info.name :
274 sub_folder_path.BaseName().LossyDisplayName() + 274 sub_folder_path.BaseName().LossyDisplayName() +
275 ASCIIToUTF16(" - ") + device_info.name); 275 ASCIIToUTF16(" - ") + device_info.name);
276 #else 276 #else
277 *device_name = device_info.name; 277 *device_name = device_info.name;
278 #endif 278 #endif
279 } 279 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 // static 342 // static
343 void MediaStorageUtil::SetGetDeviceInfoFromPathFunctionForTesting( 343 void MediaStorageUtil::SetGetDeviceInfoFromPathFunctionForTesting(
344 GetDeviceInfoFromPathFunction function) { 344 GetDeviceInfoFromPathFunction function) {
345 g_test_get_device_info_from_path_function = function; 345 g_test_get_device_info_from_path_function = function;
346 } 346 }
347 347
348 MediaStorageUtil::MediaStorageUtil() {} 348 MediaStorageUtil::MediaStorageUtil() {}
349 349
350 } // namespace chrome 350 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/system_monitor/removable_device_notifications_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698