OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 GetSelectedFileInfoInternal(profile, params.Pass()); | 118 GetSelectedFileInfoInternal(profile, params.Pass()); |
119 } | 119 } |
120 | 120 |
121 } // namespace | 121 } // namespace |
122 | 122 |
123 void VolumeInfoToVolumeMetadata( | 123 void VolumeInfoToVolumeMetadata( |
124 Profile* profile, | 124 Profile* profile, |
125 const VolumeInfo& volume_info, | 125 const VolumeInfo& volume_info, |
126 file_browser_private::VolumeMetadata* volume_metadata) { | 126 file_browser_private::VolumeMetadata* volume_metadata) { |
127 DCHECK(volume_metadata); | 127 DCHECK(volume_metadata); |
128 DCHECK(!volume_info.mount_path.empty()); | |
129 | 128 |
130 volume_metadata->volume_id = volume_info.volume_id; | 129 volume_metadata->volume_id = volume_info.volume_id; |
131 | 130 |
132 // TODO(kinaba): fill appropriate information once multi-profile support is | 131 // TODO(kinaba): fill appropriate information once multi-profile support is |
133 // implemented. | 132 // implemented. |
134 volume_metadata->profile.display_name = profile->GetProfileName(); | 133 volume_metadata->profile.display_name = profile->GetProfileName(); |
135 volume_metadata->profile.is_current_profile = true; | 134 volume_metadata->profile.is_current_profile = true; |
136 | 135 |
137 if (!volume_info.source_path.empty()) { | 136 if (!volume_info.source_path.empty()) { |
138 volume_metadata->source_path.reset( | 137 volume_metadata->source_path.reset( |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 276 |
278 drive::EventLogger* GetLogger(Profile* profile) { | 277 drive::EventLogger* GetLogger(Profile* profile) { |
279 drive::DriveIntegrationService* service = | 278 drive::DriveIntegrationService* service = |
280 drive::DriveIntegrationServiceFactory::FindForProfileRegardlessOfStates( | 279 drive::DriveIntegrationServiceFactory::FindForProfileRegardlessOfStates( |
281 profile); | 280 profile); |
282 return service ? service->event_logger() : NULL; | 281 return service ? service->event_logger() : NULL; |
283 } | 282 } |
284 | 283 |
285 } // namespace util | 284 } // namespace util |
286 } // namespace file_manager | 285 } // namespace file_manager |
OLD | NEW |