OLD | NEW |
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 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 scoped_ptr<GDataEntry> entry(it->second); | 2385 scoped_ptr<GDataEntry> entry(it->second); |
2386 // Skip if it's not a file (i.e. directory). | 2386 // Skip if it's not a file (i.e. directory). |
2387 if (!entry->AsGDataFile()) | 2387 if (!entry->AsGDataFile()) |
2388 continue; | 2388 continue; |
2389 directory->AddEntry(entry.release()); | 2389 directory->AddEntry(entry.release()); |
2390 } | 2390 } |
2391 | 2391 |
2392 // Note that there may be no change in the directory, but it's expensive to | 2392 // Note that there may be no change in the directory, but it's expensive to |
2393 // check if the new metadata matches the existing one, so we just always | 2393 // check if the new metadata matches the existing one, so we just always |
2394 // notify that the directory is changed. | 2394 // notify that the directory is changed. |
2395 NotifyDirectoryChanged(directory_path); | 2395 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(directory_path)); |
2396 DVLOG(1) << "Directory refreshed: " << directory_path.value(); | 2396 DVLOG(1) << "Directory refreshed: " << directory_path.value(); |
2397 } | 2397 } |
2398 | 2398 |
2399 void GDataFileSystem::UpdateFileByResourceId( | 2399 void GDataFileSystem::UpdateFileByResourceId( |
2400 const std::string& resource_id, | 2400 const std::string& resource_id, |
2401 const FileOperationCallback& callback) { | 2401 const FileOperationCallback& callback) { |
2402 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 2402 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
2403 BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2403 BrowserThread::CurrentlyOn(BrowserThread::IO)); |
2404 RunTaskOnUIThread( | 2404 RunTaskOnUIThread( |
2405 base::Bind(&GDataFileSystem::UpdateFileByResourceIdOnUIThread, | 2405 base::Bind(&GDataFileSystem::UpdateFileByResourceIdOnUIThread, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 base::Passed(&data))); | 2783 base::Passed(&data))); |
2784 #endif | 2784 #endif |
2785 | 2785 |
2786 // Add the current feed to the list of collected feeds for this directory. | 2786 // Add the current feed to the list of collected feeds for this directory. |
2787 params->feed_list->push_back(current_feed.release()); | 2787 params->feed_list->push_back(current_feed.release()); |
2788 | 2788 |
2789 // Compute and notify the number of entries fetched so far. | 2789 // Compute and notify the number of entries fetched so far. |
2790 int num_accumulated_entries = 0; | 2790 int num_accumulated_entries = 0; |
2791 for (size_t i = 0; i < params->feed_list->size(); ++i) | 2791 for (size_t i = 0; i < params->feed_list->size(); ++i) |
2792 num_accumulated_entries += params->feed_list->at(i)->entries().size(); | 2792 num_accumulated_entries += params->feed_list->at(i)->entries().size(); |
2793 NotifyDocumentFeedFetched(num_accumulated_entries); | 2793 |
| 2794 // Notify the observers that a document feed is fetched. |
| 2795 FOR_EACH_OBSERVER(Observer, observers_, |
| 2796 OnDocumentFeedFetched(num_accumulated_entries)); |
2794 | 2797 |
2795 // Check if we need to collect more data to complete the directory list. | 2798 // Check if we need to collect more data to complete the directory list. |
2796 if (params->should_fetch_multiple_feeds && has_next_feed_url && | 2799 if (params->should_fetch_multiple_feeds && has_next_feed_url && |
2797 !next_feed_url.is_empty()) { | 2800 !next_feed_url.is_empty()) { |
2798 // Kick of the remaining part of the feeds. | 2801 // Kick of the remaining part of the feeds. |
2799 documents_service_->GetDocuments( | 2802 documents_service_->GetDocuments( |
2800 next_feed_url, | 2803 next_feed_url, |
2801 params->start_changestamp, | 2804 params->start_changestamp, |
2802 params->search_query, | 2805 params->search_query, |
2803 params->directory_resource_id, | 2806 params->directory_resource_id, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3181 // through the file name de-duplication. | 3184 // through the file name de-duplication. |
3182 // TODO(achuith/satorux/zel): This code is fragile. The title has been | 3185 // TODO(achuith/satorux/zel): This code is fragile. The title has been |
3183 // changed, but not the file_name. TakeEntry removes the child based on the | 3186 // changed, but not the file_name. TakeEntry removes the child based on the |
3184 // old file_name, and then re-adds the child by first assigning the new title | 3187 // old file_name, and then re-adds the child by first assigning the new title |
3185 // to file_name. http://crbug.com/30157 | 3188 // to file_name. http://crbug.com/30157 |
3186 if (!entry->parent()->TakeEntry(entry)) | 3189 if (!entry->parent()->TakeEntry(entry)) |
3187 return GDATA_FILE_ERROR_FAILED; | 3190 return GDATA_FILE_ERROR_FAILED; |
3188 | 3191 |
3189 *updated_file_path = entry->GetFilePath(); | 3192 *updated_file_path = entry->GetFilePath(); |
3190 | 3193 |
3191 NotifyDirectoryChanged(updated_file_path->DirName()); | 3194 FOR_EACH_OBSERVER(Observer, observers_, |
| 3195 OnDirectoryChanged(updated_file_path->DirName())); |
3192 return GDATA_FILE_OK; | 3196 return GDATA_FILE_OK; |
3193 } | 3197 } |
3194 | 3198 |
3195 GDataFileError GDataFileSystem::AddEntryToDirectoryOnFilesystem( | 3199 GDataFileError GDataFileSystem::AddEntryToDirectoryOnFilesystem( |
3196 GDataEntry* entry, const FilePath& dir_path) { | 3200 GDataEntry* entry, const FilePath& dir_path) { |
3197 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3201 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3198 DCHECK(entry); | 3202 DCHECK(entry); |
3199 | 3203 |
3200 GDataEntry* dir_entry = directory_service_->FindEntryByPathSync(dir_path); | 3204 GDataEntry* dir_entry = directory_service_->FindEntryByPathSync(dir_path); |
3201 if (!dir_entry) | 3205 if (!dir_entry) |
3202 return GDATA_FILE_ERROR_NOT_FOUND; | 3206 return GDATA_FILE_ERROR_NOT_FOUND; |
3203 | 3207 |
3204 GDataDirectory* dir = dir_entry->AsGDataDirectory(); | 3208 GDataDirectory* dir = dir_entry->AsGDataDirectory(); |
3205 if (!dir) | 3209 if (!dir) |
3206 return GDATA_FILE_ERROR_NOT_A_DIRECTORY; | 3210 return GDATA_FILE_ERROR_NOT_A_DIRECTORY; |
3207 | 3211 |
3208 if (!dir->TakeEntry(entry)) | 3212 if (!dir->TakeEntry(entry)) |
3209 return GDATA_FILE_ERROR_FAILED; | 3213 return GDATA_FILE_ERROR_FAILED; |
3210 | 3214 |
3211 NotifyDirectoryChanged(dir_path); | 3215 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(dir_path)); |
3212 return GDATA_FILE_OK; | 3216 return GDATA_FILE_OK; |
3213 } | 3217 } |
3214 | 3218 |
3215 GDataFileError GDataFileSystem::RemoveEntryFromDirectoryOnFilesystem( | 3219 GDataFileError GDataFileSystem::RemoveEntryFromDirectoryOnFilesystem( |
3216 const FilePath& file_path, const FilePath& dir_path, | 3220 const FilePath& file_path, const FilePath& dir_path, |
3217 FilePath* updated_file_path) { | 3221 FilePath* updated_file_path) { |
3218 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3222 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3219 DCHECK(updated_file_path); | 3223 DCHECK(updated_file_path); |
3220 | 3224 |
3221 GDataEntry* entry = directory_service_->FindEntryByPathSync(file_path); | 3225 GDataEntry* entry = directory_service_->FindEntryByPathSync(file_path); |
3222 if (!entry) | 3226 if (!entry) |
3223 return GDATA_FILE_ERROR_NOT_FOUND; | 3227 return GDATA_FILE_ERROR_NOT_FOUND; |
3224 | 3228 |
3225 GDataEntry* dir = directory_service_->FindEntryByPathSync(dir_path); | 3229 GDataEntry* dir = directory_service_->FindEntryByPathSync(dir_path); |
3226 if (!dir) | 3230 if (!dir) |
3227 return GDATA_FILE_ERROR_NOT_FOUND; | 3231 return GDATA_FILE_ERROR_NOT_FOUND; |
3228 | 3232 |
3229 if (!dir->AsGDataDirectory()) | 3233 if (!dir->AsGDataDirectory()) |
3230 return GDATA_FILE_ERROR_NOT_A_DIRECTORY; | 3234 return GDATA_FILE_ERROR_NOT_A_DIRECTORY; |
3231 | 3235 |
3232 DCHECK_EQ(dir->AsGDataDirectory(), entry->parent()); | 3236 DCHECK_EQ(dir->AsGDataDirectory(), entry->parent()); |
3233 | 3237 |
3234 if (!directory_service_->root()->TakeEntry(entry)) | 3238 if (!directory_service_->root()->TakeEntry(entry)) |
3235 return GDATA_FILE_ERROR_FAILED; | 3239 return GDATA_FILE_ERROR_FAILED; |
3236 | 3240 |
3237 *updated_file_path = entry->GetFilePath(); | 3241 *updated_file_path = entry->GetFilePath(); |
3238 | 3242 |
3239 NotifyDirectoryChanged(updated_file_path->DirName()); | 3243 FOR_EACH_OBSERVER(Observer, observers_, |
| 3244 OnDirectoryChanged(updated_file_path->DirName())); |
3240 return GDATA_FILE_OK; | 3245 return GDATA_FILE_OK; |
3241 } | 3246 } |
3242 | 3247 |
3243 GDataFileError GDataFileSystem::RemoveEntryFromFileSystem( | 3248 GDataFileError GDataFileSystem::RemoveEntryFromFileSystem( |
3244 const FilePath& file_path) { | 3249 const FilePath& file_path) { |
3245 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3250 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3246 | 3251 |
3247 std::string resource_id; | 3252 std::string resource_id; |
3248 GDataFileError error = RemoveEntryFromGData(file_path, &resource_id); | 3253 GDataFileError error = RemoveEntryFromGData(file_path, &resource_id); |
3249 if (error != GDATA_FILE_OK) | 3254 if (error != GDATA_FILE_OK) |
(...skipping 21 matching lines...) Expand all Loading... |
3271 start_changestamp, | 3276 start_changestamp, |
3272 root_feed_changestamp, | 3277 root_feed_changestamp, |
3273 &changed_dirs); | 3278 &changed_dirs); |
3274 | 3279 |
3275 // Don't send directory content change notification while performing | 3280 // Don't send directory content change notification while performing |
3276 // the initial content retrieval. | 3281 // the initial content retrieval. |
3277 const bool should_notify_directory_changed = (start_changestamp != 0); | 3282 const bool should_notify_directory_changed = (start_changestamp != 0); |
3278 if (should_notify_directory_changed) { | 3283 if (should_notify_directory_changed) { |
3279 for (std::set<FilePath>::iterator dir_iter = changed_dirs.begin(); | 3284 for (std::set<FilePath>::iterator dir_iter = changed_dirs.begin(); |
3280 dir_iter != changed_dirs.end(); ++dir_iter) { | 3285 dir_iter != changed_dirs.end(); ++dir_iter) { |
3281 NotifyDirectoryChanged(*dir_iter); | 3286 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(*dir_iter)); |
3282 } | 3287 } |
3283 } | 3288 } |
3284 | 3289 |
3285 return error; | 3290 return error; |
3286 } | 3291 } |
3287 | 3292 |
3288 | 3293 |
3289 // static | 3294 // static |
3290 void GDataFileSystem::RemoveStaleEntryOnUpload(const std::string& resource_id, | 3295 void GDataFileSystem::RemoveStaleEntryOnUpload(const std::string& resource_id, |
3291 GDataDirectory* parent_dir, | 3296 GDataDirectory* parent_dir, |
3292 GDataEntry* existing_entry) { | 3297 GDataEntry* existing_entry) { |
3293 if (existing_entry && | 3298 if (existing_entry && |
3294 // This should always match, but just in case. | 3299 // This should always match, but just in case. |
3295 existing_entry->parent() == parent_dir) { | 3300 existing_entry->parent() == parent_dir) { |
3296 parent_dir->RemoveEntry(existing_entry); | 3301 parent_dir->RemoveEntry(existing_entry); |
3297 } else { | 3302 } else { |
3298 LOG(ERROR) << "Entry for the existing file not found: " << resource_id; | 3303 LOG(ERROR) << "Entry for the existing file not found: " << resource_id; |
3299 } | 3304 } |
3300 } | 3305 } |
3301 | 3306 |
3302 void GDataFileSystem::NotifyDirectoryChanged(const FilePath& directory_path) { | |
3303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
3304 | |
3305 DVLOG(1) << "Content changed of " << directory_path.value(); | |
3306 // Notify the observers that content of |directory_path| has been changed. | |
3307 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(directory_path)); | |
3308 } | |
3309 | |
3310 void GDataFileSystem::NotifyDocumentFeedFetched(int num_accumulated_entries) { | |
3311 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
3312 | |
3313 DVLOG(1) << "Document feed fetched: " << num_accumulated_entries; | |
3314 // Notify the observers that a document feed is fetched. | |
3315 FOR_EACH_OBSERVER(Observer, observers_, | |
3316 OnDocumentFeedFetched(num_accumulated_entries)); | |
3317 } | |
3318 | |
3319 void GDataFileSystem::RunAndNotifyInitialLoadFinished( | 3307 void GDataFileSystem::RunAndNotifyInitialLoadFinished( |
3320 const FindEntryCallback& callback, | 3308 const FindEntryCallback& callback, |
3321 GDataFileError error, | 3309 GDataFileError error, |
3322 GDataEntry* entry) { | 3310 GDataEntry* entry) { |
3323 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3311 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3324 | 3312 |
3325 DVLOG(1) << "Initial load finished"; | 3313 DVLOG(1) << "Initial load finished"; |
3326 if (!callback.is_null()) | 3314 if (!callback.is_null()) |
3327 callback.Run(error, entry); | 3315 callback.Run(error, entry); |
3328 | 3316 |
(...skipping 25 matching lines...) Expand all Loading... |
3354 if (!parent_dir) | 3342 if (!parent_dir) |
3355 return GDATA_FILE_ERROR_FAILED; | 3343 return GDATA_FILE_ERROR_FAILED; |
3356 | 3344 |
3357 GDataEntry* new_entry = GDataEntry::FromDocumentEntry( | 3345 GDataEntry* new_entry = GDataEntry::FromDocumentEntry( |
3358 parent_dir, doc_entry.get(), directory_service_.get()); | 3346 parent_dir, doc_entry.get(), directory_service_.get()); |
3359 if (!new_entry) | 3347 if (!new_entry) |
3360 return GDATA_FILE_ERROR_FAILED; | 3348 return GDATA_FILE_ERROR_FAILED; |
3361 | 3349 |
3362 parent_dir->AddEntry(new_entry); | 3350 parent_dir->AddEntry(new_entry); |
3363 | 3351 |
3364 NotifyDirectoryChanged(directory_path); | 3352 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(directory_path)); |
3365 return GDATA_FILE_OK; | 3353 return GDATA_FILE_OK; |
3366 } | 3354 } |
3367 | 3355 |
3368 GDataFileSystem::FindMissingDirectoryResult | 3356 GDataFileSystem::FindMissingDirectoryResult |
3369 GDataFileSystem::FindFirstMissingParentDirectory( | 3357 GDataFileSystem::FindFirstMissingParentDirectory( |
3370 const FilePath& directory_path, | 3358 const FilePath& directory_path, |
3371 GURL* last_dir_content_url, | 3359 GURL* last_dir_content_url, |
3372 FilePath* first_missing_parent_path) { | 3360 FilePath* first_missing_parent_path) { |
3373 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3361 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3374 | 3362 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3416 | 3404 |
3417 // If it's a file (only files have resource id), get its resource id so that | 3405 // If it's a file (only files have resource id), get its resource id so that |
3418 // we can remove it after releasing the auto lock. | 3406 // we can remove it after releasing the auto lock. |
3419 if (entry->AsGDataFile()) | 3407 if (entry->AsGDataFile()) |
3420 *resource_id = entry->AsGDataFile()->resource_id(); | 3408 *resource_id = entry->AsGDataFile()->resource_id(); |
3421 | 3409 |
3422 GDataDirectory* parent_dir = entry->parent(); | 3410 GDataDirectory* parent_dir = entry->parent(); |
3423 if (!parent_dir->RemoveEntry(entry)) | 3411 if (!parent_dir->RemoveEntry(entry)) |
3424 return GDATA_FILE_ERROR_NOT_FOUND; | 3412 return GDATA_FILE_ERROR_NOT_FOUND; |
3425 | 3413 |
3426 NotifyDirectoryChanged(parent_dir->GetFilePath()); | 3414 FOR_EACH_OBSERVER(Observer, observers_, |
| 3415 OnDirectoryChanged(parent_dir->GetFilePath())); |
3427 return GDATA_FILE_OK; | 3416 return GDATA_FILE_OK; |
3428 } | 3417 } |
3429 | 3418 |
3430 void GDataFileSystem::AddUploadedFile( | 3419 void GDataFileSystem::AddUploadedFile( |
3431 UploadMode upload_mode, | 3420 UploadMode upload_mode, |
3432 const FilePath& virtual_dir_path, | 3421 const FilePath& virtual_dir_path, |
3433 scoped_ptr<DocumentEntry> entry, | 3422 scoped_ptr<DocumentEntry> entry, |
3434 const FilePath& file_content_path, | 3423 const FilePath& file_content_path, |
3435 GDataCache::FileOperationType cache_operation, | 3424 GDataCache::FileOperationType cache_operation, |
3436 const base::Closure& callback) { | 3425 const base::Closure& callback) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3493 directory_service_->GetEntryByResourceIdAsync(resource_id, | 3482 directory_service_->GetEntryByResourceIdAsync(resource_id, |
3494 base::Bind(&RemoveStaleEntryOnUpload, resource_id, parent_dir)); | 3483 base::Bind(&RemoveStaleEntryOnUpload, resource_id, parent_dir)); |
3495 } | 3484 } |
3496 | 3485 |
3497 GDataFile* file = new_entry->AsGDataFile(); | 3486 GDataFile* file = new_entry->AsGDataFile(); |
3498 DCHECK(file); | 3487 DCHECK(file); |
3499 const std::string& resource_id = file->resource_id(); | 3488 const std::string& resource_id = file->resource_id(); |
3500 const std::string& md5 = file->file_md5(); | 3489 const std::string& md5 = file->file_md5(); |
3501 parent_dir->AddEntry(new_entry.release()); | 3490 parent_dir->AddEntry(new_entry.release()); |
3502 | 3491 |
3503 NotifyDirectoryChanged(virtual_dir_path); | 3492 FOR_EACH_OBSERVER(Observer, observers_, |
| 3493 OnDirectoryChanged(virtual_dir_path)); |
3504 | 3494 |
3505 if (upload_mode == UPLOAD_NEW_FILE) { | 3495 if (upload_mode == UPLOAD_NEW_FILE) { |
3506 // Add the file to the cache if we have uploaded a new file. | 3496 // Add the file to the cache if we have uploaded a new file. |
3507 cache_->StoreOnUIThread(resource_id, | 3497 cache_->StoreOnUIThread(resource_id, |
3508 md5, | 3498 md5, |
3509 file_content_path, | 3499 file_content_path, |
3510 cache_operation, | 3500 cache_operation, |
3511 base::Bind(&OnCacheUpdatedForAddUploadedFile, | 3501 base::Bind(&OnCacheUpdatedForAddUploadedFile, |
3512 callback)); | 3502 callback)); |
3513 } else if (upload_mode == UPLOAD_EXISTING_FILE) { | 3503 } else if (upload_mode == UPLOAD_EXISTING_FILE) { |
(...skipping 27 matching lines...) Expand all Loading... |
3541 void GDataFileSystem::SetHideHostedDocuments(bool hide) { | 3531 void GDataFileSystem::SetHideHostedDocuments(bool hide) { |
3542 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3532 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3543 | 3533 |
3544 if (hide == hide_hosted_docs_) | 3534 if (hide == hide_hosted_docs_) |
3545 return; | 3535 return; |
3546 | 3536 |
3547 hide_hosted_docs_ = hide; | 3537 hide_hosted_docs_ = hide; |
3548 const FilePath root_path = directory_service_->root()->GetFilePath(); | 3538 const FilePath root_path = directory_service_->root()->GetFilePath(); |
3549 | 3539 |
3550 // Kick off directory refresh when this setting changes. | 3540 // Kick off directory refresh when this setting changes. |
3551 NotifyDirectoryChanged(root_path); | 3541 FOR_EACH_OBSERVER(Observer, observers_, OnDirectoryChanged(root_path)); |
3552 } | 3542 } |
3553 | 3543 |
3554 //============= GDataFileSystem: internal helper functions ===================== | 3544 //============= GDataFileSystem: internal helper functions ===================== |
3555 | 3545 |
3556 void GDataFileSystem::InitializePreferenceObserver() { | 3546 void GDataFileSystem::InitializePreferenceObserver() { |
3557 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3547 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
3558 | 3548 |
3559 pref_registrar_.reset(new PrefChangeRegistrar()); | 3549 pref_registrar_.reset(new PrefChangeRegistrar()); |
3560 pref_registrar_->Init(profile_->GetPrefs()); | 3550 pref_registrar_->Init(profile_->GetPrefs()); |
3561 pref_registrar_->Add(prefs::kDisableGDataHostedFiles, this); | 3551 pref_registrar_->Add(prefs::kDisableGDataHostedFiles, this); |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3980 } | 3970 } |
3981 | 3971 |
3982 PlatformFileInfoProto entry_file_info; | 3972 PlatformFileInfoProto entry_file_info; |
3983 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 3973 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
3984 *entry_proto->mutable_file_info() = entry_file_info; | 3974 *entry_proto->mutable_file_info() = entry_file_info; |
3985 if (!callback.is_null()) | 3975 if (!callback.is_null()) |
3986 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); | 3976 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); |
3987 } | 3977 } |
3988 | 3978 |
3989 } // namespace gdata | 3979 } // namespace gdata |
OLD | NEW |