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

Side by Side Diff: components/ntp_snippets/category_factory.h

Issue 2244793002: Remove deleted offline page suggestions from opened NTPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust MockContentSuggestionsProvider Created 4 years, 4 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 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_
6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/ntp_snippets/category.h" 12 #include "components/ntp_snippets/category.h"
13 13
14 namespace ntp_snippets { 14 namespace ntp_snippets {
15 15
16 // Creates and orders Category instancesCategory. 16 // Creates and orders Category instances.
17 class CategoryFactory { 17 class CategoryFactory {
18 public: 18 public:
19 CategoryFactory(); 19 CategoryFactory();
20 ~CategoryFactory(); 20 ~CategoryFactory();
21 21
22 // Creates a category from a KnownCategory value. The passed |known_category| 22 // Creates a category from a KnownCategory value. The passed |known_category|
23 // must not be one of the special values (LOCAL_CATEGORIES_COUNT or 23 // must not be one of the special values (LOCAL_CATEGORIES_COUNT or
24 // REMOTE_CATEGORIES_OFFSET). 24 // REMOTE_CATEGORIES_OFFSET).
25 Category FromKnownCategory(KnownCategories known_category); 25 Category FromKnownCategory(KnownCategories known_category);
26 26
(...skipping 24 matching lines...) Expand all
51 // Stores all known categories in the order which is also returned by 51 // Stores all known categories in the order which is also returned by
52 // |CompareCategories|. 52 // |CompareCategories|.
53 std::vector<Category> ordered_categories_; 53 std::vector<Category> ordered_categories_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(CategoryFactory); 55 DISALLOW_COPY_AND_ASSIGN(CategoryFactory);
56 }; 56 };
57 57
58 } // namespace ntp_snippets 58 } // namespace ntp_snippets
59 59
60 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_ 60 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | components/ntp_snippets/content_suggestions_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698