summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-05 20:07:11 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-05 20:07:11 +0000
commit5f29c1d65b7eae25a84ce75b4147ebe5bbe4a45b (patch)
tree3ee118ee70d9a83166c5c74b149d0c83fab080a2 /chrome/service
parent930792991d819c4c14c62778731ff0dbde5ea159 (diff)
downloadchromium_src-5f29c1d65b7eae25a84ce75b4147ebe5bbe4a45b.zip
chromium_src-5f29c1d65b7eae25a84ce75b4147ebe5bbe4a45b.tar.gz
chromium_src-5f29c1d65b7eae25a84ce75b4147ebe5bbe4a45b.tar.bz2
Making GenericScopedHandle capable of handling handle types other than HANDLE.
Review URL: http://codereview.chromium.org/9582045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/cloud_print/print_system_win.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 229f2794..6b1d5df 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 {
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>