Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/offline_pages/core/prefetch/add_unique_urls_task.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 | |
| 9 namespace offline_pages { | |
| 10 | |
| 11 AddUniqueUrlsTask::AddUniqueUrlsTask( | |
| 12 PrefetchStore* store, | |
| 13 const std::string& name_space, | |
| 14 const std::vector<PrefetchURL>& prefetch_urls) | |
| 15 : store_(store), | |
| 16 name_space_(name_space), | |
| 17 prefetch_urls_(prefetch_urls), | |
| 18 weak_ptr_factory_(this) {} | |
| 19 | |
| 20 AddUniqueUrlsTask::~AddUniqueUrlsTask() {} | |
| 21 | |
| 22 void AddUniqueUrlsTask::Run() { | |
| 23 store_->CreateItemsForUniqueUrls(name_space_, prefetch_urls_, | |
|
Dmitry Titov
2017/05/26 23:05:06
This feels like delegating the whole thing to Stor
carlosk
2017/06/01 01:49:59
From my talks with fgorski@ I think the store and
| |
| 24 base::Bind(&AddUniqueUrlsTask::TaskComplete, | |
| 25 weak_ptr_factory_.GetWeakPtr())); | |
| 26 } | |
| 27 | |
| 28 } // namespace offline_pages | |
| OLD | NEW |