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

Unified Diff: printing/backend/win_helper.h

Issue 9582045: Making GenericScopedHandle capable of handling handle types other than HANDLE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: printing/backend/win_helper.h
diff --git a/printing/backend/win_helper.h b/printing/backend/win_helper.h
index 11b34ee88d444f1c03bcf9625dcfa05491e064ca..667609d584c0b5fb6b09812647de3c7d2faba823 100644
--- a/printing/backend/win_helper.h
+++ b/printing/backend/win_helper.h
@@ -20,9 +20,22 @@ namespace printing {
class PrinterHandleTraits {
Vitaly Buka (NO REVIEWS) 2012/03/05 18:52:14 PrinterHandleTraits : public HandleTraits { Clos
alexeypa (please no reviews) 2012/03/05 18:56:58 The same thing, trait classes are unrelated in thi
public:
+ typedef HANDLE Handle;
+
static bool CloseHandle(HANDLE handle) {
return ::ClosePrinter(handle) != FALSE;
}
+
+ static bool IsHandleValid(HANDLE handle) {
+ return handle != NULL;
+ }
+
+ static HANDLE NullHandle() {
+ return NULL;
+ }
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterHandleTraits);
};
typedef base::win::GenericScopedHandle<PrinterHandleTraits> ScopedPrinterHandle;

Powered by Google App Engine
This is Rietveld 408576698