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

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_system.cc

Issue 13456002: drive: Fills no-parent entiries in "/drive/other". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on 192559 Created 7 years, 8 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 (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/drive/drive_file_system.h" 5 #include "chrome/browser/chromeos/drive/drive_file_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 DCHECK(!callback.is_null()); 1083 DCHECK(!callback.is_null());
1084 1084
1085 if (error != DRIVE_FILE_OK) { 1085 if (error != DRIVE_FILE_OK) {
1086 callback.Run(error); 1086 callback.Run(error);
1087 return; 1087 return;
1088 } 1088 }
1089 if (!entry_proto->file_info().is_directory()) { 1089 if (!entry_proto->file_info().is_directory()) {
1090 callback.Run(DRIVE_FILE_ERROR_NOT_A_DIRECTORY); 1090 callback.Run(DRIVE_FILE_ERROR_NOT_A_DIRECTORY);
1091 return; 1091 return;
1092 } 1092 }
1093 if (util::IsSpecialResourceId(entry_proto->resource_id())) {
1094 // Do not load special directories. Just return.
1095 callback.Run(DRIVE_FILE_OK);
1096 return;
1097 }
1093 1098
1094 change_list_loader_->LoadDirectoryFromServer( 1099 change_list_loader_->LoadDirectoryFromServer(
1095 entry_proto->resource_id(), 1100 entry_proto->resource_id(),
1096 callback); 1101 callback);
1097 } 1102 }
1098 1103
1099 void DriveFileSystem::UpdateFileByResourceId( 1104 void DriveFileSystem::UpdateFileByResourceId(
1100 const std::string& resource_id, 1105 const std::string& resource_id,
1101 const DriveClientContext& context, 1106 const DriveClientContext& context,
1102 const FileOperationCallback& callback) { 1107 const FileOperationCallback& callback) {
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 return; 1690 return;
1686 } 1691 }
1687 1692
1688 PlatformFileInfoProto entry_file_info; 1693 PlatformFileInfoProto entry_file_info;
1689 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); 1694 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info);
1690 *entry_proto->mutable_file_info() = entry_file_info; 1695 *entry_proto->mutable_file_info() = entry_file_info;
1691 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); 1696 callback.Run(DRIVE_FILE_OK, entry_proto.Pass());
1692 } 1697 }
1693 1698
1694 } // namespace drive 1699 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_processor.cc ('k') | chrome/browser/chromeos/drive/drive_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698