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

Side by Side Diff: components/ntp_snippets/offline_pages/offline_pages_test_utils.h

Issue 2360263002: [NTPSnippets] Show all downloads on the NTP (3/3): Downloads provider. (Closed)
Patch Set: the freshest rebase. Created 4 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGES_TEST_UTILS_H_
6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGES_TEST_UTILS_H_
7
8 #include "components/ntp_snippets/content_suggestion.h"
9 #include "components/offline_pages/offline_page_item.h"
10 #include "components/offline_pages/stub_offline_page_model.h"
11
12 namespace ntp_snippets {
13 namespace test {
14
15 class FakeOfflinePageModel : public offline_pages::StubOfflinePageModel {
16 public:
17 FakeOfflinePageModel();
18 ~FakeOfflinePageModel() override;
19
20 void GetAllPages(
21 const offline_pages::MultipleOfflinePageItemCallback& callback) override;
22
23 const std::vector<offline_pages::OfflinePageItem>& items();
24 std::vector<offline_pages::OfflinePageItem>* mutable_items();
25
26 private:
27 std::vector<offline_pages::OfflinePageItem> items_;
28
29 DISALLOW_COPY_AND_ASSIGN(FakeOfflinePageModel);
30 };
31
32 offline_pages::OfflinePageItem CreateDummyOfflinePageItem(
33 int id,
34 const std::string& name_space);
35
36 void CaptureDismissedSuggestions(
37 std::vector<ntp_snippets::ContentSuggestion>* captured_suggestions,
38 std::vector<ntp_snippets::ContentSuggestion> dismissed_suggestions);
39
40 } // namespace test
41 } // namespace ntp_snippets
42
43 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGES_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698