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

Side by Side Diff: net/dns/dns_config_service_win.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | net/dns/dns_hosts.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 "net/dns/dns_config_service_win.h" 5 #include "net/dns/dns_config_service_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (key_.Open(HKEY_LOCAL_MACHINE, key, KEY_NOTIFY) != ERROR_SUCCESS) 305 if (key_.Open(HKEY_LOCAL_MACHINE, key, KEY_NOTIFY) != ERROR_SUCCESS)
306 return false; 306 return false;
307 307
308 return key_.StartWatching(base::Bind(&RegistryWatcher::OnObjectSignaled, 308 return key_.StartWatching(base::Bind(&RegistryWatcher::OnObjectSignaled,
309 base::Unretained(this))); 309 base::Unretained(this)));
310 } 310 }
311 311
312 void OnObjectSignaled() { 312 void OnObjectSignaled() {
313 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 313 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
314 tracked_objects::ScopedTracker tracking_profile( 314 tracked_objects::ScopedTracker tracking_profile(
315 FROM_HERE_WITH_EXPLICIT_FUNCTION("RegistryWatcher_OnObjectSignaled")); 315 FROM_HERE_WITH_EXPLICIT_FUNCTION(
316 "418183 RegistryWatcher::OnObjectSignaled"));
316 317
317 DCHECK(CalledOnValidThread()); 318 DCHECK(CalledOnValidThread());
318 DCHECK(!callback_.is_null()); 319 DCHECK(!callback_.is_null());
319 if (key_.StartWatching(base::Bind(&RegistryWatcher::OnObjectSignaled, 320 if (key_.StartWatching(base::Bind(&RegistryWatcher::OnObjectSignaled,
320 base::Unretained(this)))) { 321 base::Unretained(this)))) {
321 callback_.Run(true); 322 callback_.Run(true);
322 } else { 323 } else {
323 key_.Close(); 324 key_.Close();
324 callback_.Run(false); 325 callback_.Run(false);
325 } 326 }
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 759 }
759 760
760 } // namespace internal 761 } // namespace internal
761 762
762 // static 763 // static
763 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { 764 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
764 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin()); 765 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin());
765 } 766 }
766 767
767 } // namespace net 768 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | net/dns/dns_hosts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698