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

Side by Side Diff: chrome/browser/previews/previews_infobar_tab_helper.cc

Issue 2296043003: Rename Lo-Fi previews to lite pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newLoFiInfoBarAddTests
Patch Set: tbansal comments Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/previews/previews_infobar_tab_helper.h" 5 #include "chrome/browser/previews/previews_infobar_tab_helper.h"
6 6
7 #include "chrome/browser/previews/previews_infobar_delegate.h" 7 #include "chrome/browser/previews/previews_infobar_delegate.h"
8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/navigation_handle.h" 10 #include "content/public/browser/navigation_handle.h"
(...skipping 24 matching lines...) Expand all
35 35
36 void PreviewsInfoBarTabHelper::DidFinishNavigation( 36 void PreviewsInfoBarTabHelper::DidFinishNavigation(
37 content::NavigationHandle* navigation_handle) { 37 content::NavigationHandle* navigation_handle) {
38 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) 38 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
39 return; 39 return;
40 const net::HttpResponseHeaders* headers = 40 const net::HttpResponseHeaders* headers =
41 navigation_handle->GetResponseHeaders(); 41 navigation_handle->GetResponseHeaders();
42 if (headers && 42 if (headers &&
43 headers->HasHeaderValue( 43 headers->HasHeaderValue(
44 data_reduction_proxy::chrome_proxy_header(), 44 data_reduction_proxy::chrome_proxy_header(),
45 data_reduction_proxy::chrome_proxy_lo_fi_preview_directive())) { 45 data_reduction_proxy::chrome_proxy_lite_page_directive())) {
46 PreviewsInfoBarDelegate::Create(navigation_handle->GetWebContents(), 46 PreviewsInfoBarDelegate::Create(navigation_handle->GetWebContents(),
47 PreviewsInfoBarDelegate::LITE_PAGE); 47 PreviewsInfoBarDelegate::LITE_PAGE);
48 } 48 }
49 } 49 }
50 50
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698