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 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_ADD_UNIQUE_URLS_TASK_H_ | |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_ADD_UNIQUE_URLS_TASK_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/memory/weak_ptr.h" | |
12 #include "components/offline_pages/core/prefetch/prefetch_store.h" | |
13 #include "components/offline_pages/core/prefetch/prefetch_types.h" | |
14 #include "components/offline_pages/core/task.h" | |
15 #include "url/gurl.h" | |
16 | |
17 namespace offline_pages { | |
18 | |
19 // Task that adds new URL suggestions to the pipeline. URLs are matched against | |
20 // existing ones from any stage of the process so that only new, unique ones are | |
21 // actually added. Once that's done, URLs in the ZOMBIE state that didn't match | |
22 // any of the suggestions for the same namespace are deleted from the store. | |
Dmitry Titov
2017/05/18 21:24:02
Could you please add a sentence here explaining to
carlosk
2017/05/24 20:57:26
Done.
| |
23 class AddUniqueUrlsTask : public Task { | |
24 public: | |
25 AddUniqueUrlsTask(PrefetchStore* store, | |
26 const std::string& name_space, | |
27 const std::vector<PrefetchURL>& prefetch_urls); | |
28 ~AddUniqueUrlsTask() override; | |
29 | |
30 void Run() override; | |
31 | |
32 private: | |
33 PrefetchStore* store_; | |
34 std::string name_space_; | |
35 std::vector<PrefetchURL> prefetch_urls_; | |
36 | |
37 base::WeakPtrFactory<AddUniqueUrlsTask> weak_ptr_factory_; | |
38 DISALLOW_COPY_AND_ASSIGN(AddUniqueUrlsTask); | |
39 }; | |
40 | |
41 } // namespace offline_pages | |
42 | |
43 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_ADD_UNIQUE_URLS_TASK_H_ | |
OLD | NEW |