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

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

Issue 23591067: Add last_modified to CopyResource and MoveResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | chrome/browser/drive/drive_api_service.h » ('j') | 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/drive/job_scheduler.h" 5 #include "chrome/browser/chromeos/drive/job_scheduler.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 409 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
410 DCHECK(!callback.is_null()); 410 DCHECK(!callback.is_null());
411 411
412 JobEntry* new_job = CreateNewJob(TYPE_COPY_RESOURCE); 412 JobEntry* new_job = CreateNewJob(TYPE_COPY_RESOURCE);
413 new_job->task = base::Bind( 413 new_job->task = base::Bind(
414 &DriveServiceInterface::CopyResource, 414 &DriveServiceInterface::CopyResource,
415 base::Unretained(drive_service_), 415 base::Unretained(drive_service_),
416 resource_id, 416 resource_id,
417 parent_resource_id, 417 parent_resource_id,
418 new_title, 418 new_title,
419 base::Time(), // TODO(hidehiko): Support last modified.
419 base::Bind(&JobScheduler::OnGetResourceEntryJobDone, 420 base::Bind(&JobScheduler::OnGetResourceEntryJobDone,
420 weak_ptr_factory_.GetWeakPtr(), 421 weak_ptr_factory_.GetWeakPtr(),
421 new_job->job_info.job_id, 422 new_job->job_info.job_id,
422 callback)); 423 callback));
423 new_job->abort_callback = google_apis::CreateErrorRunCallback(callback); 424 new_job->abort_callback = google_apis::CreateErrorRunCallback(callback);
424 StartJob(new_job); 425 StartJob(new_job);
425 } 426 }
426 427
427 void JobScheduler::CopyHostedDocument( 428 void JobScheduler::CopyHostedDocument(
428 const std::string& resource_id, 429 const std::string& resource_id,
(...skipping 24 matching lines...) Expand all
453 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 454 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
454 DCHECK(!callback.is_null()); 455 DCHECK(!callback.is_null());
455 456
456 JobEntry* new_job = CreateNewJob(TYPE_MOVE_RESOURCE); 457 JobEntry* new_job = CreateNewJob(TYPE_MOVE_RESOURCE);
457 new_job->task = base::Bind( 458 new_job->task = base::Bind(
458 &DriveServiceInterface::MoveResource, 459 &DriveServiceInterface::MoveResource,
459 base::Unretained(drive_service_), 460 base::Unretained(drive_service_),
460 resource_id, 461 resource_id,
461 parent_resource_id, 462 parent_resource_id,
462 new_title, 463 new_title,
464 base::Time(), // TODO(hidehiko): Support last modified.
463 base::Bind(&JobScheduler::OnGetResourceEntryJobDone, 465 base::Bind(&JobScheduler::OnGetResourceEntryJobDone,
464 weak_ptr_factory_.GetWeakPtr(), 466 weak_ptr_factory_.GetWeakPtr(),
465 new_job->job_info.job_id, 467 new_job->job_info.job_id,
466 callback)); 468 callback));
467 new_job->abort_callback = google_apis::CreateErrorRunCallback(callback); 469 new_job->abort_callback = google_apis::CreateErrorRunCallback(callback);
468 StartJob(new_job); 470 StartJob(new_job);
469 } 471 }
470 472
471 void JobScheduler::RenameResource( 473 void JobScheduler::RenameResource(
472 const std::string& resource_id, 474 const std::string& resource_id,
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 case FILE_QUEUE: 1189 case FILE_QUEUE:
1188 return "FILE_QUEUE"; 1190 return "FILE_QUEUE";
1189 case NUM_QUEUES: 1191 case NUM_QUEUES:
1190 break; // This value is just a sentinel. Should never be used. 1192 break; // This value is just a sentinel. Should never be used.
1191 } 1193 }
1192 NOTREACHED(); 1194 NOTREACHED();
1193 return ""; 1195 return "";
1194 } 1196 }
1195 1197
1196 } // namespace drive 1198 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/drive/drive_api_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698