OLD | NEW |
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/most_visited_sites.h" | 5 #include "chrome/browser/android/most_visited_sites.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 } | 564 } |
565 | 565 |
566 void MostVisitedSites::TopSitesChanged(history::TopSites* top_sites, | 566 void MostVisitedSites::TopSitesChanged(history::TopSites* top_sites, |
567 ChangeReason change_reason) { | 567 ChangeReason change_reason) { |
568 if (mv_source_ == TOP_SITES) { | 568 if (mv_source_ == TOP_SITES) { |
569 // The displayed suggestions are invalidated. | 569 // The displayed suggestions are invalidated. |
570 QueryMostVisitedURLs(); | 570 QueryMostVisitedURLs(); |
571 } | 571 } |
572 } | 572 } |
573 | 573 |
574 static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) { | 574 static jlong Init(JNIEnv* env, |
| 575 const JavaParamRef<jobject>& obj, |
| 576 const JavaParamRef<jobject>& jprofile) { |
575 MostVisitedSites* most_visited_sites = | 577 MostVisitedSites* most_visited_sites = |
576 new MostVisitedSites(ProfileAndroid::FromProfileAndroid(jprofile)); | 578 new MostVisitedSites(ProfileAndroid::FromProfileAndroid(jprofile)); |
577 return reinterpret_cast<intptr_t>(most_visited_sites); | 579 return reinterpret_cast<intptr_t>(most_visited_sites); |
578 } | 580 } |
OLD | NEW |