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

Side by Side Diff: components/ntp_tiles/ntp_tile.h

Issue 2544883006: Cleanup: Replace NTPLoggingTileSource by ntp_tiles::NTPTileSource (Closed)
Patch Set: tests Created 4 years 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
« no previous file with comments | « components/ntp_tiles/BUILD.gn ('k') | components/ntp_tiles/ntp_tile_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TILES_NTP_TILE_H_ 5 #ifndef COMPONENTS_NTP_TILES_NTP_TILE_H_
6 #define COMPONENTS_NTP_TILES_NTP_TILE_H_ 6 #define COMPONENTS_NTP_TILES_NTP_TILE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "components/ntp_tiles/ntp_tile_source.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace ntp_tiles { 16 namespace ntp_tiles {
16 17
17 // The source of an NTP tile.
18 // A Java counterpart will be generated for this enum.
19 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp
20 enum class NTPTileSource {
21 // Tile comes from the personal top sites list, based on local history.
22 TOP_SITES,
23 // Tile comes from the suggestions service, based on synced history.
24 SUGGESTIONS_SERVICE,
25 // Tile is regionally popular.
26 POPULAR,
27 // Tile is on an custodian-managed whitelist.
28 WHITELIST
29 };
30
31 // A suggested site shown on the New Tab Page. 18 // A suggested site shown on the New Tab Page.
32 struct NTPTile { 19 struct NTPTile {
33 base::string16 title; 20 base::string16 title;
34 GURL url; 21 GURL url;
35 NTPTileSource source; 22 NTPTileSource source;
36 23
37 // Only valid for source == WHITELIST (empty otherwise). 24 // Only valid for source == WHITELIST (empty otherwise).
38 base::FilePath whitelist_icon_path; 25 base::FilePath whitelist_icon_path;
39 26
40 NTPTile(); 27 NTPTile();
41 NTPTile(const NTPTile&); 28 NTPTile(const NTPTile&);
42 ~NTPTile(); 29 ~NTPTile();
43 }; 30 };
44 31
45 using NTPTilesVector = std::vector<NTPTile>; 32 using NTPTilesVector = std::vector<NTPTile>;
46 33
47 } // namespace ntp_tiles 34 } // namespace ntp_tiles
48 35
49 #endif // COMPONENTS_NTP_TILES_NTP_TILE_H_ 36 #endif // COMPONENTS_NTP_TILES_NTP_TILE_H_
OLDNEW
« no previous file with comments | « components/ntp_tiles/BUILD.gn ('k') | components/ntp_tiles/ntp_tile_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698