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

Side by Side Diff: chrome/browser/offline_pages/prefetch/suggested_articles_observer.cc

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Refactor to remove GCM dependency. Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 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 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 "components/offline_pages/content/suggested_articles_observer.h" 5 #include "chrome/browser/offline_pages/prefetch/suggested_articles_observer.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/offline_pages/prefetch/prefetch_service_factory.h"
10 #include "components/ntp_snippets/category.h" 11 #include "components/ntp_snippets/category.h"
11 #include "components/ntp_snippets/category_status.h" 12 #include "components/ntp_snippets/category_status.h"
12 #include "components/offline_pages/content/prefetch_service_factory.h"
13 #include "components/offline_pages/core/client_namespace_constants.h" 13 #include "components/offline_pages/core/client_namespace_constants.h"
14 #include "components/offline_pages/core/offline_page_feature.h" 14 #include "components/offline_pages/core/offline_page_feature.h"
15 #include "components/offline_pages/core/prefetch/prefetch_service_impl.h" 15 #include "components/offline_pages/core/prefetch/prefetch_service_impl.h"
16 16
17 using ntp_snippets::Category; 17 using ntp_snippets::Category;
18 using ntp_snippets::ContentSuggestion; 18 using ntp_snippets::ContentSuggestion;
19 19
20 namespace offline_pages { 20 namespace offline_pages {
21 21
22 namespace { 22 namespace {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 service->RemoveAllUnprocessedPrefetchURLs(kSuggestedArticlesNamespace); 159 service->RemoveAllUnprocessedPrefetchURLs(kSuggestedArticlesNamespace);
160 OnNewSuggestions(ArticlesCategory()); 160 OnNewSuggestions(ArticlesCategory());
161 } 161 }
162 162
163 void SuggestedArticlesObserver::ContentSuggestionsServiceShutdown() { 163 void SuggestedArticlesObserver::ContentSuggestionsServiceShutdown() {
164 // No need to do anything here, we will just stop getting events. 164 // No need to do anything here, we will just stop getting events.
165 } 165 }
166 166
167 } // namespace offline_pages 167 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698