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

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

Issue 140513008: drive: Allow setting modified/accessed date with AddNewDirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 const std::string& directory_title, 566 const std::string& directory_title,
567 const google_apis::GetResourceEntryCallback& callback) { 567 const google_apis::GetResourceEntryCallback& callback) {
568 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 568 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
569 569
570 JobEntry* new_job = CreateNewJob(TYPE_ADD_NEW_DIRECTORY); 570 JobEntry* new_job = CreateNewJob(TYPE_ADD_NEW_DIRECTORY);
571 new_job->task = base::Bind( 571 new_job->task = base::Bind(
572 &DriveServiceInterface::AddNewDirectory, 572 &DriveServiceInterface::AddNewDirectory,
573 base::Unretained(drive_service_), 573 base::Unretained(drive_service_),
574 parent_resource_id, 574 parent_resource_id,
575 directory_title, 575 directory_title,
576 DriveServiceInterface::AddNewDirectoryOptions(),
576 base::Bind(&JobScheduler::OnGetResourceEntryJobDone, 577 base::Bind(&JobScheduler::OnGetResourceEntryJobDone,
577 weak_ptr_factory_.GetWeakPtr(), 578 weak_ptr_factory_.GetWeakPtr(),
578 new_job->job_info.job_id, 579 new_job->job_info.job_id,
579 callback)); 580 callback));
580 new_job->abort_callback = CreateErrorRunCallback(callback); 581 new_job->abort_callback = CreateErrorRunCallback(callback);
581 StartJob(new_job); 582 StartJob(new_job);
582 } 583 }
583 584
584 JobID JobScheduler::DownloadFile( 585 JobID JobScheduler::DownloadFile(
585 const base::FilePath& virtual_path, 586 const base::FilePath& virtual_path,
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 case FILE_QUEUE: 1195 case FILE_QUEUE:
1195 return "FILE_QUEUE"; 1196 return "FILE_QUEUE";
1196 case NUM_QUEUES: 1197 case NUM_QUEUES:
1197 break; // This value is just a sentinel. Should never be used. 1198 break; // This value is just a sentinel. Should never be used.
1198 } 1199 }
1199 NOTREACHED(); 1200 NOTREACHED();
1200 return ""; 1201 return "";
1201 } 1202 }
1202 1203
1203 } // namespace drive 1204 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698