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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_util.cc

Issue 294073007: [fsp] Let extensions decide about the file system id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // TODO(kinaba): fill appropriate information once multi-profile support is 131 // TODO(kinaba): fill appropriate information once multi-profile support is
132 // implemented. 132 // implemented.
133 volume_metadata->profile.display_name = profile->GetProfileName(); 133 volume_metadata->profile.display_name = profile->GetProfileName();
134 volume_metadata->profile.is_current_profile = true; 134 volume_metadata->profile.is_current_profile = true;
135 135
136 if (!volume_info.source_path.empty()) { 136 if (!volume_info.source_path.empty()) {
137 volume_metadata->source_path.reset( 137 volume_metadata->source_path.reset(
138 new std::string(volume_info.source_path.AsUTF8Unsafe())); 138 new std::string(volume_info.source_path.AsUTF8Unsafe()));
139 } 139 }
140 140
141 volume_metadata->extension_id.reset( 141 if (volume_info.type == VOLUME_TYPE_PROVIDED) {
142 new std::string(volume_info.extension_id)); 142 volume_metadata->extension_id.reset(
143 new std::string(volume_info.extension_id));
144
145 volume_metadata->file_system_id.reset(
146 new std::string(volume_info.file_system_id));
147 }
143 148
144 volume_metadata->volume_label.reset( 149 volume_metadata->volume_label.reset(
145 new std::string(volume_info.volume_label)); 150 new std::string(volume_info.volume_label));
146 151
147 switch (volume_info.type) { 152 switch (volume_info.type) {
148 case VOLUME_TYPE_GOOGLE_DRIVE: 153 case VOLUME_TYPE_GOOGLE_DRIVE:
149 volume_metadata->volume_type = 154 volume_metadata->volume_type =
150 file_browser_private::VOLUME_TYPE_DRIVE; 155 file_browser_private::VOLUME_TYPE_DRIVE;
151 break; 156 break;
152 case VOLUME_TYPE_DOWNLOADS_DIRECTORY: 157 case VOLUME_TYPE_DOWNLOADS_DIRECTORY:
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 291
287 drive::EventLogger* GetLogger(Profile* profile) { 292 drive::EventLogger* GetLogger(Profile* profile) {
288 drive::DriveIntegrationService* service = 293 drive::DriveIntegrationService* service =
289 drive::DriveIntegrationServiceFactory::FindForProfileRegardlessOfStates( 294 drive::DriveIntegrationServiceFactory::FindForProfileRegardlessOfStates(
290 profile); 295 profile);
291 return service ? service->event_logger() : NULL; 296 return service ? service->event_logger() : NULL;
292 } 297 }
293 298
294 } // namespace util 299 } // namespace util
295 } // namespace file_manager 300 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698