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

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

Issue 14884015: drive: Remove DriveFileType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 (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/sync_client.h" 5 #include "chrome/browser/chromeos/drive/sync_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return; 296 return;
297 } 297 }
298 298
299 // Finally, adding to the queue. 299 // Finally, adding to the queue.
300 AddTaskToQueue(FETCH, resource_id); 300 AddTaskToQueue(FETCH, resource_id);
301 } 301 }
302 302
303 void SyncClient::OnFetchFileComplete(const std::string& resource_id, 303 void SyncClient::OnFetchFileComplete(const std::string& resource_id,
304 FileError error, 304 FileError error,
305 const base::FilePath& local_path, 305 const base::FilePath& local_path,
306 const std::string& ununsed_mime_type, 306 scoped_ptr<ResourceEntry> entry) {
307 DriveFileType file_type) {
308 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 307 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
309 308
310 fetch_list_.erase(resource_id); 309 fetch_list_.erase(resource_id);
311 310
312 if (error == FILE_ERROR_OK) { 311 if (error == FILE_ERROR_OK) {
313 DVLOG(1) << "Fetched " << resource_id << ": " 312 DVLOG(1) << "Fetched " << resource_id << ": "
314 << local_path.value(); 313 << local_path.value();
315 } else { 314 } else {
316 switch (error) { 315 switch (error) {
317 case FILE_ERROR_NO_CONNECTION: 316 case FILE_ERROR_NO_CONNECTION:
(...skipping 16 matching lines...) Expand all
334 if (error == FILE_ERROR_OK) { 333 if (error == FILE_ERROR_OK) {
335 DVLOG(1) << "Uploaded " << resource_id; 334 DVLOG(1) << "Uploaded " << resource_id;
336 } else { 335 } else {
337 // TODO(satorux): We should re-queue if the error is recoverable. 336 // TODO(satorux): We should re-queue if the error is recoverable.
338 LOG(WARNING) << "Failed to upload " << resource_id << ": " 337 LOG(WARNING) << "Failed to upload " << resource_id << ": "
339 << FileErrorToString(error); 338 << FileErrorToString(error);
340 } 339 }
341 } 340 }
342 341
343 } // namespace drive 342 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/sync_client.h ('k') | chrome/browser/chromeos/drive/sync_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698