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

Side by Side Diff: chrome/browser/page_load_metrics/observers/previews_page_load_metrics_observer.cc

Issue 2450353005: Revert of Showing previews UI for Offline Previews (Closed)
Patch Set: Created 4 years, 1 month 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/page_load_metrics/observers/previews_page_load_metrics_ observer.h" 5 #include "chrome/browser/page_load_metrics/observers/previews_page_load_metrics_ observer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 PAGE_LOAD_HISTOGRAM(internal::kHistogramOfflinePreviewsParseStart, 106 PAGE_LOAD_HISTOGRAM(internal::kHistogramOfflinePreviewsParseStart,
107 timing.parse_start.value()); 107 timing.parse_start.value());
108 } 108 }
109 109
110 bool PreviewsPageLoadMetricsObserver::IsOfflinePreview( 110 bool PreviewsPageLoadMetricsObserver::IsOfflinePreview(
111 content::WebContents* web_contents) const { 111 content::WebContents* web_contents) const {
112 #if BUILDFLAG(ANDROID_JAVA_UI) 112 #if BUILDFLAG(ANDROID_JAVA_UI)
113 offline_pages::OfflinePageTabHelper* tab_helper = 113 offline_pages::OfflinePageTabHelper* tab_helper =
114 offline_pages::OfflinePageTabHelper::FromWebContents(web_contents); 114 offline_pages::OfflinePageTabHelper::FromWebContents(web_contents);
115 return tab_helper && tab_helper->IsShowingOfflinePreview(); 115 return tab_helper && tab_helper->is_offline_preview();
116 #else 116 #else
117 return false; 117 return false;
118 #endif // BUILDFLAG(ANDROID_JAVA_UI) 118 #endif // BUILDFLAG(ANDROID_JAVA_UI)
119 } 119 }
120 120
121 } // namespace previews 121 } // namespace previews
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_utils.cc ('k') | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698