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

Side by Side Diff: base/win/registry.cc

Issue 1092863002: Apply automated fixits for Chrome clang plugin to base_unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix format Created 5 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 | « base/win/pe_image.h ('k') | base/win/registry_unittest.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 "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 20 matching lines...) Expand all
31 31
32 // Mask to pull WOW64 access flags out of REGSAM access. 32 // Mask to pull WOW64 access flags out of REGSAM access.
33 const REGSAM kWow64AccessMask = KEY_WOW64_32KEY | KEY_WOW64_64KEY; 33 const REGSAM kWow64AccessMask = KEY_WOW64_32KEY | KEY_WOW64_64KEY;
34 34
35 } // namespace 35 } // namespace
36 36
37 // Watches for modifications to a key. 37 // Watches for modifications to a key.
38 class RegKey::Watcher : public ObjectWatcher::Delegate { 38 class RegKey::Watcher : public ObjectWatcher::Delegate {
39 public: 39 public:
40 explicit Watcher(RegKey* owner) : owner_(owner) {} 40 explicit Watcher(RegKey* owner) : owner_(owner) {}
41 ~Watcher() {} 41 ~Watcher() override {}
42 42
43 bool StartWatching(HKEY key, const ChangeCallback& callback); 43 bool StartWatching(HKEY key, const ChangeCallback& callback);
44 44
45 // Implementation of ObjectWatcher::Delegate. 45 // Implementation of ObjectWatcher::Delegate.
46 void OnObjectSignaled(HANDLE object) override { 46 void OnObjectSignaled(HANDLE object) override {
47 DCHECK(watch_event_.IsValid() && watch_event_.Get() == object); 47 DCHECK(watch_event_.IsValid() && watch_event_.Get() == object);
48 ChangeCallback callback = callback_; 48 ChangeCallback callback = callback_;
49 callback_.Reset(); 49 callback_.Reset();
50 callback.Run(); 50 callback.Run();
51 } 51 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « base/win/pe_image.h ('k') | base/win/registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698