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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10826288: gdata: Remove use of GetEntryInfoByPathAsyncOnUIThread() from CloseFileOnUIThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | 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) 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 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after
3220 3220
3221 if (open_files_.find(file_path) == open_files_.end()) { 3221 if (open_files_.find(file_path) == open_files_.end()) {
3222 // The file is not being opened. 3222 // The file is not being opened.
3223 MessageLoop::current()->PostTask( 3223 MessageLoop::current()->PostTask(
3224 FROM_HERE, 3224 FROM_HERE,
3225 base::Bind(callback, GDATA_FILE_ERROR_NOT_FOUND)); 3225 base::Bind(callback, GDATA_FILE_ERROR_NOT_FOUND));
3226 return; 3226 return;
3227 } 3227 }
3228 3228
3229 // Step 1 of CloseFile: Get resource_id and md5 for |file_path|. 3229 // Step 1 of CloseFile: Get resource_id and md5 for |file_path|.
3230 GetEntryInfoByPathAsyncOnUIThread( 3230 directory_service_->GetEntryInfoByPath(
3231 file_path, 3231 file_path,
3232 base::Bind(&GDataFileSystem::OnGetEntryInfoCompleteForCloseFile, 3232 base::Bind(&GDataFileSystem::OnGetEntryInfoCompleteForCloseFile,
3233 ui_weak_ptr_, 3233 ui_weak_ptr_,
3234 file_path, 3234 file_path,
3235 base::Bind(&GDataFileSystem::OnCloseFileFinished, 3235 base::Bind(&GDataFileSystem::OnCloseFileFinished,
3236 ui_weak_ptr_, 3236 ui_weak_ptr_,
3237 file_path, 3237 file_path,
3238 callback))); 3238 callback)));
3239 } 3239 }
3240 3240
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3491 } 3491 }
3492 3492
3493 PlatformFileInfoProto entry_file_info; 3493 PlatformFileInfoProto entry_file_info;
3494 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); 3494 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info);
3495 *entry_proto->mutable_file_info() = entry_file_info; 3495 *entry_proto->mutable_file_info() = entry_file_info;
3496 if (!callback.is_null()) 3496 if (!callback.is_null())
3497 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); 3497 callback.Run(GDATA_FILE_OK, entry_proto.Pass());
3498 } 3498 }
3499 3499
3500 } // namespace gdata 3500 } // namespace gdata
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698