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

Unified Diff: chrome/service/cloud_print/print_system_win.cc

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: chrome/service/cloud_print/print_system_win.cc
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 229f2794803684c0716edb9e477e5e8d3aaf6039..6b1d5df817e343ae2e1d7427f5ed48e4cdedc66f 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -35,9 +35,22 @@ namespace {
class PrinterChangeHandleTraits {
Vitaly Buka (NO REVIEWS) 2012/03/05 18:52:14 : pubic HandleTraits
alexeypa (please no reviews) 2012/03/05 18:56:58 No, why? HandleTraits and PrinterChangeHandleTrait
brettw 2012/03/05 18:58:44 I would not necessarily expect that the traits cla
public:
+ typedef HANDLE Handle;
+
static bool CloseHandle(HANDLE handle) {
return ::FindClosePrinterChangeNotification(handle) != FALSE;
}
+
+ static bool IsHandleValid(HANDLE handle) {
+ return handle != NULL;
+ }
+
+ static HANDLE NullHandle() {
+ return NULL;
+ }
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterChangeHandleTraits);
};
typedef base::win::GenericScopedHandle<PrinterChangeHandleTraits>

Powered by Google App Engine
This is Rietveld 408576698