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

Side by Side Diff: chrome/browser/android/popular_sites.h

Issue 1340493002: Add initial version of chrome://popular-sites-internals page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch_country_version
Patch Set: Created 5 years, 3 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_POPULAR_SITES_H_ 5 #ifndef CHROME_BROWSER_ANDROID_POPULAR_SITES_H_
6 #define CHROME_BROWSER_ANDROID_POPULAR_SITES_H_ 6 #define CHROME_BROWSER_ANDROID_POPULAR_SITES_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // locale. |override_country| (if non-empty) is used to override the 49 // locale. |override_country| (if non-empty) is used to override the
50 // auto-detected country. |override_version|, if non-empty, will 50 // auto-detected country. |override_version|, if non-empty, will
51 // override the baked-in default version. 51 // override the baked-in default version.
52 // |override_filename|, if non-empty, will override the full filename 52 // |override_filename|, if non-empty, will override the full filename
53 // (so |override_country| and |override_version| are ignored in this case). 53 // (so |override_country| and |override_version| are ignored in this case).
54 // TODO(treib): Get rid of |override_filename|. 54 // TODO(treib): Get rid of |override_filename|.
55 PopularSites(Profile* profile, 55 PopularSites(Profile* profile,
56 const std::string& override_country, 56 const std::string& override_country,
57 const std::string& override_version, 57 const std::string& override_version,
58 const std::string& override_filename, 58 const std::string& override_filename,
59 bool force_download,
Bernhard Bauer 2015/09/11 16:00:06 Add a comment?
Marc Treib 2015/09/22 11:13:56 Done.
59 const FinishedCallback& callback); 60 const FinishedCallback& callback);
60 ~PopularSites(); 61 ~PopularSites();
61 62
62 const std::vector<Site>& sites() const { return sites_; } 63 const std::vector<Site>& sites() const { return sites_; }
63 64
64 private: 65 private:
65 void OnDownloadDone(const base::FilePath& path, bool success); 66 void OnDownloadDone(const base::FilePath& path, bool success);
66 void OnJsonParsed(scoped_ptr<std::vector<Site>> sites); 67 void OnJsonParsed(scoped_ptr<std::vector<Site>> sites);
67 68
68 FinishedCallback callback_; 69 FinishedCallback callback_;
69 scoped_ptr<FileDownloader> downloader_; 70 scoped_ptr<FileDownloader> downloader_;
70 std::vector<Site> sites_; 71 std::vector<Site> sites_;
71 72
72 base::WeakPtrFactory<PopularSites> weak_ptr_factory_; 73 base::WeakPtrFactory<PopularSites> weak_ptr_factory_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(PopularSites); 75 DISALLOW_COPY_AND_ASSIGN(PopularSites);
75 }; 76 };
76 77
77 #endif // CHROME_BROWSER_ANDROID_POPULAR_SITES_H_ 78 #endif // CHROME_BROWSER_ANDROID_POPULAR_SITES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698