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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 1957313003: Remove PopularSites' dependencies on //chrome/.... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h" 5 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 env, observer_.obj(), ToJavaArrayOfStrings(env, urls).obj(), 105 env, observer_.obj(), ToJavaArrayOfStrings(env, urls).obj(),
106 ToJavaArrayOfStrings(env, favicon_urls).obj(), 106 ToJavaArrayOfStrings(env, favicon_urls).obj(),
107 ToJavaArrayOfStrings(env, large_icon_urls).obj()); 107 ToJavaArrayOfStrings(env, large_icon_urls).obj());
108 } 108 }
109 109
110 MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile) 110 MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
111 : most_visited_(profile->GetPrefs(), 111 : most_visited_(profile->GetPrefs(),
112 TemplateURLServiceFactory::GetForProfile(profile), 112 TemplateURLServiceFactory::GetForProfile(profile),
113 g_browser_process->variations_service(), 113 g_browser_process->variations_service(),
114 profile->GetRequestContext(), 114 profile->GetRequestContext(),
115 ChromePopularSites::GetDirectory(),
115 TopSitesFactory::GetForProfile(profile), 116 TopSitesFactory::GetForProfile(profile),
116 SuggestionsServiceFactory::GetForProfile(profile), 117 SuggestionsServiceFactory::GetForProfile(profile),
117 profile->IsChild(), 118 profile->IsChild(),
118 profile) { 119 profile) {
119 // Register the thumbnails debugging page. 120 // Register the thumbnails debugging page.
120 // TODO(sfiera): find thumbnails a home. They don't belong here. 121 // TODO(sfiera): find thumbnails a home. They don't belong here.
121 content::URLDataSource::Add(profile, new ThumbnailListSource(profile)); 122 content::URLDataSource::Add(profile, new ThumbnailListSource(profile));
122 } 123 }
123 124
124 MostVisitedSitesBridge::~MostVisitedSitesBridge() {} 125 MostVisitedSitesBridge::~MostVisitedSitesBridge() {}
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 182 }
182 183
183 static jlong Init(JNIEnv* env, 184 static jlong Init(JNIEnv* env,
184 const JavaParamRef<jobject>& obj, 185 const JavaParamRef<jobject>& obj,
185 const JavaParamRef<jobject>& jprofile) { 186 const JavaParamRef<jobject>& jprofile) {
186 MostVisitedSitesBridge* most_visited_sites = 187 MostVisitedSitesBridge* most_visited_sites =
187 new MostVisitedSitesBridge( 188 new MostVisitedSitesBridge(
188 ProfileAndroid::FromProfileAndroid(jprofile)); 189 ProfileAndroid::FromProfileAndroid(jprofile));
189 return reinterpret_cast<intptr_t>(most_visited_sites); 190 return reinterpret_cast<intptr_t>(most_visited_sites);
190 } 191 }
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites.cc ('k') | chrome/browser/android/ntp/popular_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698