| 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 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 // The observer to be notified when the list of most visited sites changes. | 106 // The observer to be notified when the list of most visited sites changes. |
| 107 base::android::ScopedJavaGlobalRef<jobject> observer_; | 107 base::android::ScopedJavaGlobalRef<jobject> observer_; |
| 108 | 108 |
| 109 // The maximum number of most visited sites to return. | 109 // The maximum number of most visited sites to return. |
| 110 int num_sites_; | 110 int num_sites_; |
| 111 | 111 |
| 112 // Whether the user is in a control group for the purposes of logging. | 112 // Whether the user is in a control group for the purposes of logging. |
| 113 bool is_control_group_; | 113 bool is_control_group_; |
| 114 | 114 |
| 115 // Keeps track of whether the initial NTP load has been done. |
| 116 bool initial_load_done_; |
| 117 |
| 115 // Counters for UMA metrics. | 118 // Counters for UMA metrics. |
| 116 | 119 |
| 117 // Number of tiles using a local thumbnail image for this NTP session. | 120 // Number of tiles using a local thumbnail image for this NTP session. |
| 118 int num_local_thumbs_; | 121 int num_local_thumbs_; |
| 119 // Number of tiles for which a server thumbnail is provided. | 122 // Number of tiles for which a server thumbnail is provided. |
| 120 int num_server_thumbs_; | 123 int num_server_thumbs_; |
| 121 // Number of tiles for which no thumbnail is found/specified and a gray tile | 124 // Number of tiles for which no thumbnail is found/specified and a gray tile |
| 122 // is used as the main tile. | 125 // is used as the main tile. |
| 123 int num_empty_thumbs_; | 126 int num_empty_thumbs_; |
| 124 | 127 |
| 125 // Copy of the server suggestions (if enabled). Used for logging. | 128 // Copy of the server suggestions (if enabled). Used for logging. |
| 126 suggestions::SuggestionsProfile server_suggestions_; | 129 suggestions::SuggestionsProfile server_suggestions_; |
| 127 | 130 |
| 128 content::NotificationRegistrar registrar_; | 131 content::NotificationRegistrar registrar_; |
| 129 | 132 |
| 130 MostVisitedSource mv_source_; | 133 MostVisitedSource mv_source_; |
| 131 | 134 |
| 132 // For callbacks may be run after destruction. | 135 // For callbacks may be run after destruction. |
| 133 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 136 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
| 134 | 137 |
| 135 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 138 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 141 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| OLD | NEW |