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

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

Issue 1983063002: Move classes to //components/ntp_tiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_ANDROID_NTP_POPULAR_SITES_H_ 5 #ifndef COMPONENTS_NTP_TILES_POPULAR_SITES_H_
6 #define CHROME_BROWSER_ANDROID_NTP_POPULAR_SITES_H_ 6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
(...skipping 12 matching lines...) Expand all
29 class PrefRegistrySyncable; 29 class PrefRegistrySyncable;
30 } 30 }
31 31
32 namespace variations { 32 namespace variations {
33 class VariationsService; 33 class VariationsService;
34 } 34 }
35 35
36 class PrefService; 36 class PrefService;
37 class TemplateURLService; 37 class TemplateURLService;
38 38
39 // TODO(sfiera): move to chrome_popular_sites.h
40 class ChromePopularSites {
41 public:
42 static base::FilePath GetDirectory();
43
44 private:
45 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromePopularSites);
46 };
47
48 // Downloads and provides a list of suggested popular sites, for display on 39 // Downloads and provides a list of suggested popular sites, for display on
49 // the NTP when there are not enough personalized suggestions. Caches the 40 // the NTP when there are not enough personalized suggestions. Caches the
50 // downloaded file on disk to avoid re-downloading on every startup. 41 // downloaded file on disk to avoid re-downloading on every startup.
51 class PopularSites : public net::URLFetcherDelegate { 42 class PopularSites : public net::URLFetcherDelegate {
52 public: 43 public:
53 struct Site { 44 struct Site {
54 Site(const base::string16& title, 45 Site(const base::string16& title,
55 const GURL& url, 46 const GURL& url,
56 const GURL& favicon_url, 47 const GURL& favicon_url,
57 const GURL& large_icon_url, 48 const GURL& large_icon_url,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 PrefService* prefs_; 143 PrefService* prefs_;
153 net::URLRequestContextGetter* download_context_; 144 net::URLRequestContextGetter* download_context_;
154 145
155 scoped_refptr<base::TaskRunner> blocking_runner_; 146 scoped_refptr<base::TaskRunner> blocking_runner_;
156 147
157 base::WeakPtrFactory<PopularSites> weak_ptr_factory_; 148 base::WeakPtrFactory<PopularSites> weak_ptr_factory_;
158 149
159 DISALLOW_COPY_AND_ASSIGN(PopularSites); 150 DISALLOW_COPY_AND_ASSIGN(PopularSites);
160 }; 151 };
161 152
162 #endif // CHROME_BROWSER_ANDROID_NTP_POPULAR_SITES_H_ 153 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_H_
OLDNEW
« no previous file with comments | « components/ntp_tiles/most_visited_sites_unittest.cc ('k') | components/ntp_tiles/popular_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698