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

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

Issue 2022313002: UI for the Data Saver InfoBar Promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobarPromo
Patch Set: dismiss on navigation Created 4 years, 6 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_promo_infobar_delegate_android.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc b/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2d03972556e4b94324d417a28587d66ea2014488
--- /dev/null
+++ b/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc
@@ -0,0 +1,39 @@
+// Copyright 2016 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_promo_infobar_delegate_android.h"
+
+#include "chrome/browser/android/android_theme_resources.h"
+#include "chrome/browser/infobars/infobar_service.h"
+#include "components/infobars/core/infobar.h"
+#include "components/infobars/core/infobar_delegate.h"
+#include "content/public/browser/web_contents.h"
+#include "grit/components_strings.h"
+#include "ui/base/l10n/l10n_util.h"
+
+// static
+void DataReductionPromoInfoBarDelegateAndroid::Create(
+ content::WebContents* web_contents) {
+ InfoBarService* infobar_service =
+ InfoBarService::FromWebContents(web_contents);
+ infobar_service->AddInfoBar(
+ DataReductionPromoInfoBarDelegateAndroid::CreateInfoBar(
+ infobar_service,
+ std::unique_ptr<DataReductionPromoInfoBarDelegateAndroid>(
+ new DataReductionPromoInfoBarDelegateAndroid())));
+}
+
+DataReductionPromoInfoBarDelegateAndroid::
+ DataReductionPromoInfoBarDelegateAndroid()
+ : ConfirmInfoBarDelegate() {}
+
+infobars::InfoBarDelegate::InfoBarIdentifier
+DataReductionPromoInfoBarDelegateAndroid::GetIdentifier() const {
+ return DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDROID;
+}
+
+base::string16 DataReductionPromoInfoBarDelegateAndroid::GetMessageText()
+ const {
+ return base::string16();
+}

Powered by Google App Engine
This is Rietveld 408576698