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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 2792383003: Rename ScopedComPtr::Release() to ScopedComPtr::Reset() (Closed)
Patch Set: Fix New Callers Created 3 years, 8 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 | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/utility/importer/ie_importer_win.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 (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/service/cloud_print/print_system.h" 5 #include "chrome/service/cloud_print/print_system.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // Helper class to allow PrintXPSDocument() to have multiple exits. 386 // Helper class to allow PrintXPSDocument() to have multiple exits.
387 class PrintJobCanceler { 387 class PrintJobCanceler {
388 public: 388 public:
389 explicit PrintJobCanceler( 389 explicit PrintJobCanceler(
390 base::win::ScopedComPtr<IXpsPrintJob>* job_ptr) 390 base::win::ScopedComPtr<IXpsPrintJob>* job_ptr)
391 : job_ptr_(job_ptr) { 391 : job_ptr_(job_ptr) {
392 } 392 }
393 ~PrintJobCanceler() { 393 ~PrintJobCanceler() {
394 if (job_ptr_ && job_ptr_->get()) { 394 if (job_ptr_ && job_ptr_->get()) {
395 (*job_ptr_)->Cancel(); 395 (*job_ptr_)->Cancel();
396 job_ptr_->Release(); 396 job_ptr_->Reset();
397 } 397 }
398 } 398 }
399 399
400 void reset() { job_ptr_ = NULL; } 400 void reset() { job_ptr_ = NULL; }
401 401
402 private: 402 private:
403 base::win::ScopedComPtr<IXpsPrintJob>* job_ptr_; 403 base::win::ScopedComPtr<IXpsPrintJob>* job_ptr_;
404 404
405 DISALLOW_COPY_AND_ASSIGN(PrintJobCanceler); 405 DISALLOW_COPY_AND_ASSIGN(PrintJobCanceler);
406 }; 406 };
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 834 }
835 835
836 } // namespace 836 } // namespace
837 837
838 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( 838 scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
839 const base::DictionaryValue* print_system_settings) { 839 const base::DictionaryValue* print_system_settings) {
840 return new PrintSystemWin; 840 return new PrintSystemWin;
841 } 841 }
842 842
843 } // namespace cloud_print 843 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/utility/importer/ie_importer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698