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

Side by Side Diff: chrome/browser/storage_monitor/test_volume_mount_watcher_win.cc

Issue 12211084: [Media Galleries] Populate volume metadata in ChromeOS/Linux (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix linux problems Created 7 years, 9 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
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // TestVolumeMountWatcherWin implementation. 5 // TestVolumeMountWatcherWin implementation.
6 6
7 #include "chrome/browser/storage_monitor/test_volume_mount_watcher_win.h" 7 #include "chrome/browser/storage_monitor/test_volume_mount_watcher_win.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (path.value()[0] < L'A' || path.value()[0] > L'Z') { 50 if (path.value()[0] < L'A' || path.value()[0] > L'Z') {
51 return false; 51 return false;
52 } 52 }
53 53
54 if (device_location) 54 if (device_location)
55 *device_location = path.value(); 55 *device_location = path.value();
56 if (total_size_in_bytes) 56 if (total_size_in_bytes)
57 *total_size_in_bytes = 1000000; 57 *total_size_in_bytes = 1000000;
58 if (unique_id) { 58 if (unique_id) {
59 *unique_id = "\\\\?\\Volume{00000000-0000-0000-0000-000000000000}\\"; 59 *unique_id = "\\\\?\\Volume{00000000-0000-0000-0000-000000000000}\\";
60 (*unique_id)[11] = path.value()[0]; 60 (*unique_id)[11] = device_path.value()[0];
61 } 61 }
62 if (name) 62 if (name)
63 *name = path.Append(L" Drive").LossyDisplayName(); 63 *name = path.Append(L" Drive").LossyDisplayName();
64 if (removable) { 64 if (removable) {
65 *removable = (path.value() != ASCIIToUTF16("N:\\") && 65 *removable = (path.value() != ASCIIToUTF16("N:\\") &&
66 path.value() != ASCIIToUTF16("C:\\")); 66 path.value() != ASCIIToUTF16("C:\\"));
67 } 67 }
68 return true; 68 return true;
69 } 69 }
70 70
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 string16* name, 144 string16* name,
145 bool* removable, 145 bool* removable,
146 uint64* total_size_in_bytes) { 146 uint64* total_size_in_bytes) {
147 return GetMassStorageDeviceDetails( 147 return GetMassStorageDeviceDetails(
148 device_path, device_location, unique_id, name, removable, 148 device_path, device_location, unique_id, name, removable,
149 total_size_in_bytes); 149 total_size_in_bytes);
150 } 150 }
151 151
152 } // namespace test 152 } // namespace test
153 } // namespace chrome 153 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698