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

Side by Side Diff: chrome/browser/android/offline_pages/recent_tab_helper.cc

Issue 2640923003: Remove popup overlay from MHTML when requested (Closed)
Patch Set: Rebase Created 3 years, 11 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/android/offline_pages/recent_tab_helper.h" 5 #include "chrome/browser/android/offline_pages/recent_tab_helper.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 ReportSnapshotCompleted(snapshot_info); 284 ReportSnapshotCompleted(snapshot_info);
285 return; 285 return;
286 } 286 }
287 287
288 snapshot_info->expected_page_quality = 288 snapshot_info->expected_page_quality =
289 snapshot_controller_->current_page_quality(); 289 snapshot_controller_->current_page_quality();
290 OfflinePageModel::SavePageParams save_page_params; 290 OfflinePageModel::SavePageParams save_page_params;
291 save_page_params.url = snapshot_url_; 291 save_page_params.url = snapshot_url_;
292 save_page_params.client_id = snapshot_info->client_id; 292 save_page_params.client_id = snapshot_info->client_id;
293 save_page_params.proposed_offline_id = snapshot_info->request_id; 293 save_page_params.proposed_offline_id = snapshot_info->request_id;
294 save_page_params.is_background = false;
294 page_model_->SavePage( 295 page_model_->SavePage(
295 save_page_params, delegate_->CreatePageArchiver(web_contents()), 296 save_page_params, delegate_->CreatePageArchiver(web_contents()),
296 base::Bind(&RecentTabHelper::SavePageCallback, 297 base::Bind(&RecentTabHelper::SavePageCallback,
297 weak_ptr_factory_.GetWeakPtr(), snapshot_info)); 298 weak_ptr_factory_.GetWeakPtr(), snapshot_info));
298 } 299 }
299 300
300 void RecentTabHelper::SavePageCallback(SnapshotProgressInfo* snapshot_info, 301 void RecentTabHelper::SavePageCallback(SnapshotProgressInfo* snapshot_info,
301 OfflinePageModel::SavePageResult result, 302 OfflinePageModel::SavePageResult result,
302 int64_t offline_id) { 303 int64_t offline_id) {
303 DCHECK(snapshot_info->IsForLastN() || 304 DCHECK(snapshot_info->IsForLastN() ||
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 else 346 else
346 request_coordinator->EnableForOffliner(snapshot_info->request_id, 347 request_coordinator->EnableForOffliner(snapshot_info->request_id,
347 snapshot_info->client_id); 348 snapshot_info->client_id);
348 } 349 }
349 350
350 ClientId RecentTabHelper::GetRecentPagesClientId() const { 351 ClientId RecentTabHelper::GetRecentPagesClientId() const {
351 return ClientId(kLastNNamespace, tab_id_); 352 return ClientId(kLastNNamespace, tab_id_);
352 } 353 }
353 354
354 } // namespace offline_pages 355 } // namespace offline_pages
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/prerendering_offliner.cc ('k') | components/offline_pages/core/offline_page_archiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698