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

Side by Side Diff: chrome/browser/printing/pdf_to_emf_converter.cc

Issue 2317123002: c/browser, c/common, components O-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/printing/pdf_to_emf_converter.h" 5 #include "chrome/browser/printing/pdf_to_emf_converter.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 29 matching lines...) Expand all
40 // Allows to delete temporary directory after all temporary files created inside 40 // Allows to delete temporary directory after all temporary files created inside
41 // are closed. Windows cannot delete directory with opened files. Directory is 41 // are closed. Windows cannot delete directory with opened files. Directory is
42 // used to store PDF and metafiles. PDF should be gone by the time utility 42 // used to store PDF and metafiles. PDF should be gone by the time utility
43 // process exits. Metafiles should be gone when all LazyEmf destroyed. 43 // process exits. Metafiles should be gone when all LazyEmf destroyed.
44 class RefCountedTempDir 44 class RefCountedTempDir
45 : public base::RefCountedThreadSafe<RefCountedTempDir, 45 : public base::RefCountedThreadSafe<RefCountedTempDir,
46 BrowserThread::DeleteOnFileThread> { 46 BrowserThread::DeleteOnFileThread> {
47 public: 47 public:
48 RefCountedTempDir() { ignore_result(temp_dir_.CreateUniqueTempDir()); } 48 RefCountedTempDir() { ignore_result(temp_dir_.CreateUniqueTempDir()); }
49 bool IsValid() const { return temp_dir_.IsValid(); } 49 bool IsValid() const { return temp_dir_.IsValid(); }
50 const base::FilePath& GetPath() const { return temp_dir_.path(); } 50 const base::FilePath& GetPath() const { return temp_dir_.GetPath(); }
51 51
52 private: 52 private:
53 friend struct BrowserThread::DeleteOnThread<BrowserThread::FILE>; 53 friend struct BrowserThread::DeleteOnThread<BrowserThread::FILE>;
54 friend class base::DeleteHelper<RefCountedTempDir>; 54 friend class base::DeleteHelper<RefCountedTempDir>;
55 ~RefCountedTempDir() {} 55 ~RefCountedTempDir() {}
56 56
57 base::ScopedTempDir temp_dir_; 57 base::ScopedTempDir temp_dir_;
58 DISALLOW_COPY_AND_ASSIGN(RefCountedTempDir); 58 DISALLOW_COPY_AND_ASSIGN(RefCountedTempDir);
59 }; 59 };
60 60
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 PdfToEmfConverter::~PdfToEmfConverter() { 541 PdfToEmfConverter::~PdfToEmfConverter() {
542 } 542 }
543 543
544 // static 544 // static
545 std::unique_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() { 545 std::unique_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() {
546 return std::unique_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl()); 546 return std::unique_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl());
547 } 547 }
548 548
549 } // namespace printing 549 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698