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

Side by Side Diff: chrome/browser/local_discovery/privet_http_impl.cc

Issue 502173004: Remove implicit conversions from scoped_refptr to T* in chrome/browser/local_discovery/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/browser/local_discovery/privet_http_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/local_discovery/privet_http_impl.h" 5 #include "chrome/browser/local_discovery/privet_http_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 if (!pwg_raster_converter_) 673 if (!pwg_raster_converter_)
674 pwg_raster_converter_ = PWGRasterConverter::CreateDefault(); 674 pwg_raster_converter_ = PWGRasterConverter::CreateDefault();
675 675
676 double scale = dpi_; 676 double scale = dpi_;
677 scale /= printing::kPointsPerInch; 677 scale /= printing::kPointsPerInch;
678 // Make vertical rectangle to optimize streaming to printer. Fix orientation 678 // Make vertical rectangle to optimize streaming to printer. Fix orientation
679 // by autorotate. 679 // by autorotate.
680 gfx::Rect area(std::min(page_size_.width(), page_size_.height()) * scale, 680 gfx::Rect area(std::min(page_size_.width(), page_size_.height()) * scale,
681 std::max(page_size_.width(), page_size_.height()) * scale); 681 std::max(page_size_.width(), page_size_.height()) * scale);
682 pwg_raster_converter_->Start( 682 pwg_raster_converter_->Start(
683 data_, 683 data_.get(),
684 printing::PdfRenderSettings(area, dpi_, true), 684 printing::PdfRenderSettings(area, dpi_, true),
685 transform_settings, 685 transform_settings,
686 base::Bind(&PrivetLocalPrintOperationImpl::OnPWGRasterConverted, 686 base::Bind(&PrivetLocalPrintOperationImpl::OnPWGRasterConverted,
687 base::Unretained(this))); 687 base::Unretained(this)));
688 } 688 }
689 689
690 void PrivetLocalPrintOperationImpl::OnSubmitdocResponse( 690 void PrivetLocalPrintOperationImpl::OnSubmitdocResponse(
691 bool has_error, 691 bool has_error,
692 const base::DictionaryValue* value) { 692 const base::DictionaryValue* value) {
693 std::string error; 693 std::string error;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 PrivetV1HTTPClientImpl::CreateStorageReadOperation( 942 PrivetV1HTTPClientImpl::CreateStorageReadOperation(
943 const std::string& path, 943 const std::string& path,
944 const PrivetDataReadOperation::ResultCallback& callback) { 944 const PrivetDataReadOperation::ResultCallback& callback) {
945 std::string url_param = 945 std::string url_param =
946 base::StringPrintf(kPrivetStorageParamPathFormat, path.c_str()); 946 base::StringPrintf(kPrivetStorageParamPathFormat, path.c_str());
947 return scoped_ptr<PrivetDataReadOperation>(new PrivetDataReadOperationImpl( 947 return scoped_ptr<PrivetDataReadOperation>(new PrivetDataReadOperationImpl(
948 info_client(), kPrivetStorageContentPath, url_param, callback)); 948 info_client(), kPrivetStorageContentPath, url_param, callback));
949 } 949 }
950 950
951 } // namespace local_discovery 951 } // namespace local_discovery
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_http_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698