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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc

Issue 2250223002: Add InfoBar delegate for previews (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add count of infobars shown per session Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
index a75e05fc74d1e1923593810a0a1e0ccdfe57b1d3..79213d08407a89407ffec77c8e12e41917895f59 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
@@ -11,6 +11,7 @@
#include "build/build_config.h"
#include "chrome/browser/net/spdyproxy/chrome_data_use_group_provider.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
+#include "chrome/browser/previews/previews_infobar_delegate.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/pref_names.h"
@@ -25,7 +26,6 @@
#if defined(OS_ANDROID)
#include "base/android/build_info.h"
-#include "chrome/browser/android/tab_android.h"
#endif
namespace content {
@@ -43,11 +43,9 @@ namespace {
void OnLoFiResponseReceivedOnUI(content::WebContents* web_contents,
bool is_preview) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-#if defined(OS_ANDROID)
- TabAndroid* tab = TabAndroid::FromWebContents(web_contents);
- if (tab)
- tab->OnLoFiResponseReceived(is_preview);
-#endif
+ PreviewsInfoBarDelegate::Create(web_contents,
Peter Kasting 2016/08/23 19:48:17 Is this code accessible on non-Android builds? Ri
megjablon 2016/08/23 23:54:16 Right now we can enable previews on desktop via a
Peter Kasting 2016/08/24 03:18:27 I am OK with resolving this issue as a follow-up,
megjablon 2016/08/24 21:44:29 The code fully works on all platforms so it doesn'
+ is_preview ? PreviewsInfoBarDelegate::PREVIEW
+ : PreviewsInfoBarDelegate::LOFI);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698