| OLD | NEW |
| 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 "base/win/registry.h" | 5 #include "base/win/registry.h" |
| 6 | 6 |
| 7 #include <shlwapi.h> | 7 #include <shlwapi.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Watch the registry key for a change of value. | 76 // Watch the registry key for a change of value. |
| 77 LONG result = RegNotifyChangeKeyValue(key, TRUE, filter, watch_event_.Get(), | 77 LONG result = RegNotifyChangeKeyValue(key, TRUE, filter, watch_event_.Get(), |
| 78 TRUE); | 78 TRUE); |
| 79 if (result != ERROR_SUCCESS) { | 79 if (result != ERROR_SUCCESS) { |
| 80 watch_event_.Close(); | 80 watch_event_.Close(); |
| 81 return false; | 81 return false; |
| 82 } | 82 } |
| 83 | 83 |
| 84 callback_ = callback; | 84 callback_ = callback; |
| 85 return object_watcher_.StartWatching(watch_event_.Get(), this); | 85 return object_watcher_.StartWatching(watch_event_.Get(), this, false); |
| 86 } | 86 } |
| 87 | 87 |
| 88 // RegKey ---------------------------------------------------------------------- | 88 // RegKey ---------------------------------------------------------------------- |
| 89 | 89 |
| 90 RegKey::RegKey() : key_(NULL), wow64access_(0) { | 90 RegKey::RegKey() : key_(NULL), wow64access_(0) { |
| 91 } | 91 } |
| 92 | 92 |
| 93 RegKey::RegKey(HKEY key) : key_(key), wow64access_(0) { | 93 RegKey::RegKey(HKEY key) : key_(key), wow64access_(0) { |
| 94 } | 94 } |
| 95 | 95 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 } else { | 671 } else { |
| 672 index_ = count - 1; | 672 index_ = count - 1; |
| 673 } | 673 } |
| 674 } | 674 } |
| 675 | 675 |
| 676 Read(); | 676 Read(); |
| 677 } | 677 } |
| 678 | 678 |
| 679 } // namespace win | 679 } // namespace win |
| 680 } // namespace base | 680 } // namespace base |
| OLD | NEW |