Chromium Code Reviews| Index: components/drive/job_scheduler.cc |
| diff --git a/components/drive/job_scheduler.cc b/components/drive/job_scheduler.cc |
| index a6568d9aa934ce348aaeeae7842a4839eb11e9a4..c14d41eb4c0ca01b908cfbb4e073c1e3cbe99aa7 100644 |
| --- a/components/drive/job_scheduler.cc |
| +++ b/components/drive/job_scheduler.cc |
| @@ -722,7 +722,8 @@ void JobScheduler::AddPermission( |
| JobScheduler::JobEntry* JobScheduler::CreateNewJob(JobType type) { |
| JobEntry* job = new JobEntry(type); |
| - job->job_info.job_id = job_map_.Add(job); // Takes the ownership of |job|. |
| + job->job_info.job_id = job_map_.Add( |
| + std::unique_ptr<JobEntry>(job)); // Takes the ownership of |job|. |
|
aelias_OOO_until_Jul13
2016/11/10 06:04:48
Please replace this with base::MakeUnique<JobEntry
rlanday
2016/11/10 18:20:01
So this one's a little weird, job is actually used
aelias_OOO_until_Jul13
2016/11/10 19:36:19
Yes, that's preferable in both cases, thanks.
|
| return job; |
| } |