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

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

Issue 384853002: Add notification of data reduction proxy field trial (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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_infobar_delegate.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..86b41a98a39f5c92cc24f1a9c265cf485f73e96a
--- /dev/null
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.h"
+
+#include "chrome/browser/infobars/infobar_service.h"
+#include "components/infobars/core/infobar.h"
+#include "content/public/browser/web_contents.h"
+
+// static
+void DataReductionProxyInfoBarDelegate::Create(
+ content::WebContents* web_contents) {
+ InfoBarService::FromWebContents(web_contents)->AddInfoBar(
+ DataReductionProxyInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<DataReductionProxyInfoBarDelegate>(
+ new DataReductionProxyInfoBarDelegate())));
+}
+
+DataReductionProxyInfoBarDelegate::~DataReductionProxyInfoBarDelegate() {
+}
+
+DataReductionProxyInfoBarDelegate::DataReductionProxyInfoBarDelegate()
+ : ConfirmInfoBarDelegate() {
+}
+
+bool DataReductionProxyInfoBarDelegate::ShouldExpire(
+ const NavigationDetails& details) const {
+ return false;
+}
+
+base::string16 DataReductionProxyInfoBarDelegate::GetMessageText() const {
+ return base::string16();
+}
+
+int DataReductionProxyInfoBarDelegate::GetButtons() const {
+ return BUTTON_NONE;
+}
+
+
marq (ping after 24h) 2014/07/11 16:16:11 Spurious newline.
bengr 2014/07/11 21:39:42 Done.

Powered by Google App Engine
This is Rietveld 408576698