| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 web_contents->GetController().Reload( | 144 web_contents->GetController().Reload( |
| 145 content::ReloadType::DISABLE_LOFI_MODE, true); | 145 content::ReloadType::DISABLE_LOFI_MODE, true); |
| 146 else if (infobar_type_ == LOFI) | 146 else if (infobar_type_ == LOFI) |
| 147 web_contents->ReloadLoFiImages(); | 147 web_contents->ReloadLoFiImages(); |
| 148 | 148 |
| 149 auto* data_reduction_proxy_settings = | 149 auto* data_reduction_proxy_settings = |
| 150 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 150 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 151 web_contents->GetBrowserContext()); | 151 web_contents->GetBrowserContext()); |
| 152 data_reduction_proxy_settings->IncrementLoFiUserRequestsForImages(); | 152 data_reduction_proxy_settings->IncrementLoFiUserRequestsForImages(); |
| 153 } else if (infobar_type_ == OFFLINE) { | 153 } else if (infobar_type_ == OFFLINE) { |
| 154 web_contents->GetController().Reload(content::ReloadType::NORMAL, true); | 154 // Prevent LoFi and lite page modes from showing after reload. |
| 155 // TODO(ryansturm): rename DISABLE_LOFI_MODE to DISABLE_PREVIEWS. |
| 156 // crbug.com/707272 |
| 157 web_contents->GetController().Reload(content::ReloadType::DISABLE_LOFI_MODE, |
| 158 true); |
| 155 } | 159 } |
| 156 | 160 |
| 157 return true; | 161 return true; |
| 158 } | 162 } |
| OLD | NEW |