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

Side by Side Diff: chrome/browser/browsing_data/media_licenses_counter.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browsing_data/media_licenses_counter.h" 5 #include "chrome/browser/browsing_data/media_licenses_counter.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 filesystem_context->default_file_task_runner(), FROM_HERE, 71 filesystem_context->default_file_task_runner(), FROM_HERE,
72 base::Bind(&CountOriginsOnFileTaskRunner, 72 base::Bind(&CountOriginsOnFileTaskRunner,
73 base::RetainedRef(filesystem_context)), 73 base::RetainedRef(filesystem_context)),
74 base::Bind(&MediaLicensesCounter::OnContentLicensesObtained, 74 base::Bind(&MediaLicensesCounter::OnContentLicensesObtained,
75 weak_ptr_factory_.GetWeakPtr())); 75 weak_ptr_factory_.GetWeakPtr()));
76 } 76 }
77 77
78 void MediaLicensesCounter::OnContentLicensesObtained( 78 void MediaLicensesCounter::OnContentLicensesObtained(
79 const std::set<GURL>& origins) { 79 const std::set<GURL>& origins) {
80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
81 ReportResult(base::WrapUnique(new MediaLicenseResult(this, origins))); 81 ReportResult(base::MakeUnique<MediaLicenseResult>(this, origins));
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698