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

Unified Diff: chrome/browser/android/ntp/most_visited_sites_bridge.h

Issue 2572533002: Add ChromeMostVisitedSitesFactory (Closed)
Patch Set: Use factory for webui 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/ntp/most_visited_sites_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/most_visited_sites_bridge.h
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.h b/chrome/browser/android/ntp/most_visited_sites_bridge.h
index 18020c9ba8bf462fbc3ebfb7c5ea4105660ab87e..a86483d2a1c826775e66ca04f761370b956345c2 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.h
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.h
@@ -6,22 +6,18 @@
#define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_
#include <jni.h>
-#include <stddef.h>
#include <memory>
-#include <string>
-#include <vector>
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
-#include "chrome/browser/supervised_user/supervised_user_service.h"
-#include "chrome/browser/supervised_user/supervised_user_service_observer.h"
-#include "components/ntp_tiles/most_visited_sites.h"
-
-using ntp_tiles::NTPTilesVector;
class Profile;
+namespace ntp_tiles {
+class MostVisitedSites;
+} // namespace ntp_tiles
+
// Provides the list of most visited sites and their thumbnails to Java.
class MostVisitedSitesBridge {
public:
@@ -62,29 +58,7 @@ class MostVisitedSitesBridge {
class JavaObserver;
std::unique_ptr<JavaObserver> java_observer_;
- class SupervisorBridge : public ntp_tiles::MostVisitedSitesSupervisor,
- public SupervisedUserServiceObserver {
- public:
- explicit SupervisorBridge(Profile* profile);
- ~SupervisorBridge() override;
-
- void SetObserver(Observer* observer) override;
- bool IsBlocked(const GURL& url) override;
- std::vector<MostVisitedSitesSupervisor::Whitelist> whitelists() override;
- bool IsChildProfile() override;
-
- // SupervisedUserServiceObserver implementation.
- void OnURLFilterChanged() override;
-
- private:
- Profile* const profile_;
- Observer* supervisor_observer_;
- ScopedObserver<SupervisedUserService, SupervisedUserServiceObserver>
- register_observer_;
- };
- SupervisorBridge supervisor_;
-
- ntp_tiles::MostVisitedSites most_visited_;
+ std::unique_ptr<ntp_tiles::MostVisitedSites> most_visited_;
DISALLOW_COPY_AND_ASSIGN(MostVisitedSitesBridge);
};
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/ntp/most_visited_sites_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698