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

Side by Side 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: rebase 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "components/infobars/core/infobar.h"
10 #include "components/infobars/core/infobar_delegate.h"
11 #include "content/public/browser/web_contents.h"
12
13 // static
14 void DataReductionProxyInfoBarDelegate::Create(
15 content::WebContents* web_contents) {
16 InfoBarService::FromWebContents(web_contents)->AddInfoBar(
17 DataReductionProxyInfoBarDelegate::CreateInfoBar(
18 scoped_ptr<DataReductionProxyInfoBarDelegate>(
19 new DataReductionProxyInfoBarDelegate())));
20 }
21
22 #if !defined(OS_ANDROID)
23 // This infobar currently only supports Android.
24
25 // static
26 scoped_ptr<infobars::InfoBar> DataReductionProxyInfoBarDelegate::CreateInfoBar(
27 scoped_ptr<DataReductionProxyInfoBarDelegate> delegate) {
28 return ConfirmInfoBarDelegate::CreateInfoBar(
29 delegate.PassAs<ConfirmInfoBarDelegate>());
30 }
31 #endif
32
33 DataReductionProxyInfoBarDelegate::~DataReductionProxyInfoBarDelegate() {
34 }
35
36 DataReductionProxyInfoBarDelegate::DataReductionProxyInfoBarDelegate()
37 : ConfirmInfoBarDelegate() {
38 }
39
40 bool DataReductionProxyInfoBarDelegate::ShouldExpire(
41 const NavigationDetails& details) const {
42 return false;
43 }
44
45 base::string16 DataReductionProxyInfoBarDelegate::GetMessageText() const {
46 return base::string16();
47 }
48
49 int DataReductionProxyInfoBarDelegate::GetButtons() const {
50 return BUTTON_NONE;
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698