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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc

Issue 2956733002: Add 'Updated just now' timestamp to the Previews infobar (Closed)
Patch Set: tbansal comments Created 3 years, 6 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/previews/previews_infobar_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 } 56 }
57 57
58 // If this is the first Lo-Fi response for a page load, a 58 // If this is the first Lo-Fi response for a page load, a
59 // PreviewsInfoBarDelegate is created, which handles showing Lo-Fi UI. 59 // PreviewsInfoBarDelegate is created, which handles showing Lo-Fi UI.
60 void OnLoFiResponseReceivedOnUI(content::WebContents* web_contents) { 60 void OnLoFiResponseReceivedOnUI(content::WebContents* web_contents) {
61 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 61 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
62 PreviewsInfoBarDelegate::Create( 62 PreviewsInfoBarDelegate::Create(
63 web_contents, previews::PreviewsType::LOFI, 63 web_contents, previews::PreviewsType::LOFI,
64 base::Time() /* previews_freshness */, true /* is_data_saver_user */, 64 base::Time() /* previews_freshness */, true /* is_data_saver_user */,
65 false /* is_reload */,
65 base::Bind(&AddPreviewNavigationToBlackListCallback, 66 base::Bind(&AddPreviewNavigationToBlackListCallback,
66 web_contents->GetBrowserContext(), 67 web_contents->GetBrowserContext(),
67 web_contents->GetController() 68 web_contents->GetController()
68 .GetLastCommittedEntry() 69 .GetLastCommittedEntry()
69 ->GetRedirectChain()[0], 70 ->GetRedirectChain()[0],
70 previews::PreviewsType::LOFI)); 71 previews::PreviewsType::LOFI));
71 } 72 }
72 73
73 } // namespace 74 } // namespace
74 75
(...skipping 19 matching lines...) Expand all
94 data_reduction_proxy_io_data->set_lofi_decider( 95 data_reduction_proxy_io_data->set_lofi_decider(
95 base::MakeUnique<data_reduction_proxy::ContentLoFiDecider>()); 96 base::MakeUnique<data_reduction_proxy::ContentLoFiDecider>());
96 data_reduction_proxy_io_data->set_resource_type_provider( 97 data_reduction_proxy_io_data->set_resource_type_provider(
97 base::MakeUnique<data_reduction_proxy::ContentResourceTypeProvider>()); 98 base::MakeUnique<data_reduction_proxy::ContentResourceTypeProvider>());
98 data_reduction_proxy_io_data->set_lofi_ui_service( 99 data_reduction_proxy_io_data->set_lofi_ui_service(
99 base::MakeUnique<data_reduction_proxy::ContentLoFiUIService>( 100 base::MakeUnique<data_reduction_proxy::ContentLoFiUIService>(
100 ui_task_runner, base::Bind(&OnLoFiResponseReceivedOnUI))); 101 ui_task_runner, base::Bind(&OnLoFiResponseReceivedOnUI)));
101 102
102 return data_reduction_proxy_io_data; 103 return data_reduction_proxy_io_data;
103 } 104 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/previews/previews_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698