Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_delegate.h" | 5 #include "chrome/browser/previews/previews_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "chrome/browser/android/android_theme_resources.h" | 8 #include "chrome/browser/android/android_theme_resources.h" |
| 9 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 web_contents->GetController().Reload( | 148 web_contents->GetController().Reload( |
| 149 content::ReloadType::DISABLE_LOFI_MODE, true); | 149 content::ReloadType::DISABLE_LOFI_MODE, true); |
| 150 else if (infobar_type_ == LOFI) | 150 else if (infobar_type_ == LOFI) |
| 151 web_contents->ReloadLoFiImages(); | 151 web_contents->ReloadLoFiImages(); |
| 152 | 152 |
| 153 auto* data_reduction_proxy_settings = | 153 auto* data_reduction_proxy_settings = |
| 154 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 154 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 155 web_contents->GetBrowserContext()); | 155 web_contents->GetBrowserContext()); |
| 156 data_reduction_proxy_settings->IncrementLoFiUserRequestsForImages(); | 156 data_reduction_proxy_settings->IncrementLoFiUserRequestsForImages(); |
| 157 } else if (infobar_type_ == OFFLINE) { | 157 } else if (infobar_type_ == OFFLINE) { |
| 158 web_contents->GetController().Reload(content::ReloadType::NORMAL, true); | 158 web_contents->GetController().Reload(content::ReloadType::DISABLE_LOFI_MODE, |
|
bengr
2017/03/31 16:59:56
Does this flag also disable lite pages? If so, ple
RyanSturm
2017/03/31 18:53:42
DISABLE_LOFI_MODE triggers PREVIEWS_NO_TRANSFORM,
| |
| 159 true); | |
| 159 } | 160 } |
| 160 | 161 |
| 161 return true; | 162 return true; |
| 162 } | 163 } |
| OLD | NEW |