diff options
author | vitalybuka <vitalybuka@chromium.org> | 2014-09-12 02:19:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-12 09:28:05 +0000 |
commit | 5d1290581ae0d39d5c640c1f95ba298946515dbe (patch) | |
tree | 370d078537161b95c196d42a121ff0ede1d2f547 /printing/pdf_metafile_cg_mac.cc | |
parent | 07d6071e18c1fa48a7667c1ca78a64573dd4c849 (diff) | |
download | chromium_src-5d1290581ae0d39d5c640c1f95ba298946515dbe.zip chromium_src-5d1290581ae0d39d5c640c1f95ba298946515dbe.tar.gz chromium_src-5d1290581ae0d39d5c640c1f95ba298946515dbe.tar.bz2 |
Extracted MetafilePlayer interface from printing::MetafilePlayer.
Removed some unused code.
Updated interfaces from plain pointers to scoped_ptr<>
SaveTo(base::FilePath) replaced with SaveTo(base::File).
BUG=408184
TBR=sgurun@chromium.org
Review URL: https://codereview.chromium.org/568633002
Cr-Commit-Position: refs/heads/master@{#294556}
Diffstat (limited to 'printing/pdf_metafile_cg_mac.cc')
-rw-r--r-- | printing/pdf_metafile_cg_mac.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/printing/pdf_metafile_cg_mac.cc b/printing/pdf_metafile_cg_mac.cc index 8668738..47915d1 100644 --- a/printing/pdf_metafile_cg_mac.cc +++ b/printing/pdf_metafile_cg_mac.cc @@ -286,19 +286,6 @@ bool PdfMetafileCg::GetData(void* dst_buffer, uint32 dst_buffer_size) const { return true; } -bool PdfMetafileCg::SaveTo(const base::FilePath& file_path) const { - DCHECK(pdf_data_.get()); - DCHECK(!context_.get()); - - std::string path_string = file_path.value(); - ScopedCFTypeRef<CFURLRef> path_url(CFURLCreateFromFileSystemRepresentation( - kCFAllocatorDefault, reinterpret_cast<const UInt8*>(path_string.c_str()), - path_string.length(), false)); - SInt32 error_code; - CFURLWriteDataAndPropertiesToResource(path_url, pdf_data_, NULL, &error_code); - return error_code == 0; -} - CGContextRef PdfMetafileCg::context() const { return context_.get(); } |