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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager.h

Issue 941823002: [App banners] Add server-controlled experiment to disable app banners (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag BACK to about:flags, use it to disable half of the feature Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BANNERS_APP_BANNER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h" 9 #include "base/android/jni_weak_ref.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Record that the banner could be shown at this point, if the triggering 106 // Record that the banner could be shown at this point, if the triggering
107 // heuristic allowed. 107 // heuristic allowed.
108 void RecordCouldShowBanner(const std::string& package_or_start_url); 108 void RecordCouldShowBanner(const std::string& package_or_start_url);
109 109
110 // Check if the banner should be shown. 110 // Check if the banner should be shown.
111 bool CheckIfShouldShow(const std::string& package_or_start_url); 111 bool CheckIfShouldShow(const std::string& package_or_start_url);
112 112
113 // Cancels an active BitmapFetcher, stopping its banner from appearing. 113 // Cancels an active BitmapFetcher, stopping its banner from appearing.
114 void CancelActiveFetcher(); 114 void CancelActiveFetcher();
115 115
116 // Whether or not the banners should appear for native apps.
117 static bool IsEnabledForNativeApps();
118
116 // Icon size that we want to be use for the launcher. 119 // Icon size that we want to be use for the launcher.
117 const int preferred_icon_size_; 120 const int preferred_icon_size_;
118 121
119 // Fetches the icon for an app. Weakly held because they delete themselves. 122 // Fetches the icon for an app. Weakly held because they delete themselves.
120 BannerBitmapFetcher* fetcher_; 123 BannerBitmapFetcher* fetcher_;
121 124
122 GURL validated_url_; 125 GURL validated_url_;
123 GURL app_icon_url_; 126 GURL app_icon_url_;
124 127
125 base::string16 app_title_; 128 base::string16 app_title_;
(...skipping 13 matching lines...) Expand all
139 142
140 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); 143 DISALLOW_COPY_AND_ASSIGN(AppBannerManager);
141 }; // class AppBannerManager 144 }; // class AppBannerManager
142 145
143 // Register native methods 146 // Register native methods
144 bool RegisterAppBannerManager(JNIEnv* env); 147 bool RegisterAppBannerManager(JNIEnv* env);
145 148
146 } // namespace banners 149 } // namespace banners
147 150
148 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ 151 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698