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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 1803263002: base: Make RefCountedBytes::TakeVector return ref ptr instead of raw ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/print_preview/print_preview_ui.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 void PrintPreviewUI::GetPrintPreviewDataForIndex( 437 void PrintPreviewUI::GetPrintPreviewDataForIndex(
438 int index, 438 int index,
439 scoped_refptr<base::RefCountedBytes>* data) { 439 scoped_refptr<base::RefCountedBytes>* data) {
440 print_preview_data_service()->GetDataEntry(id_, index, data); 440 print_preview_data_service()->GetDataEntry(id_, index, data);
441 } 441 }
442 442
443 void PrintPreviewUI::SetPrintPreviewDataForIndex( 443 void PrintPreviewUI::SetPrintPreviewDataForIndex(
444 int index, 444 int index,
445 const base::RefCountedBytes* data) { 445 scoped_refptr<base::RefCountedBytes> data) {
446 print_preview_data_service()->SetDataEntry(id_, index, data); 446 print_preview_data_service()->SetDataEntry(id_, index, std::move(data));
447 } 447 }
448 448
449 void PrintPreviewUI::ClearAllPreviewData() { 449 void PrintPreviewUI::ClearAllPreviewData() {
450 print_preview_data_service()->RemoveEntry(id_); 450 print_preview_data_service()->RemoveEntry(id_);
451 } 451 }
452 452
453 int PrintPreviewUI::GetAvailableDraftPageCount() { 453 int PrintPreviewUI::GetAvailableDraftPageCount() {
454 return print_preview_data_service()->GetAvailableDraftPageCount(id_); 454 return print_preview_data_service()->GetAvailableDraftPageCount(id_);
455 } 455 }
456 456
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 669 }
670 670
671 void PrintPreviewUI::SetPdfSavedClosureForTesting( 671 void PrintPreviewUI::SetPdfSavedClosureForTesting(
672 const base::Closure& closure) { 672 const base::Closure& closure) {
673 handler_->SetPdfSavedClosureForTesting(closure); 673 handler_->SetPdfSavedClosureForTesting(closure);
674 } 674 }
675 675
676 base::WeakPtr<PrintPreviewUI> PrintPreviewUI::GetWeakPtr() { 676 base::WeakPtr<PrintPreviewUI> PrintPreviewUI::GetWeakPtr() {
677 return weak_ptr_factory_.GetWeakPtr(); 677 return weak_ptr_factory_.GetWeakPtr();
678 } 678 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.h ('k') | ui/base/x/selection_requestor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698