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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_registry.cc

Issue 916103007: Remove DCHECK in DialRegistry dtor. This may trigger on browser shutdown if (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment. 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 | « chrome/browser/extensions/api/dial/dial_api.h ('k') | no next file » | 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 "chrome/browser/extensions/api/dial/dial_registry.h" 5 #include "chrome/browser/extensions/api/dial/dial_registry.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 24 matching lines...) Expand all
35 refresh_interval_delta_(refresh_interval), 35 refresh_interval_delta_(refresh_interval),
36 expiration_delta_(expiration), 36 expiration_delta_(expiration),
37 max_devices_(max_devices), 37 max_devices_(max_devices),
38 dial_api_(dial_api) { 38 dial_api_(dial_api) {
39 DCHECK(max_devices_ > 0); 39 DCHECK(max_devices_ > 0);
40 NetworkChangeNotifier::AddNetworkChangeObserver(this); 40 NetworkChangeNotifier::AddNetworkChangeObserver(this);
41 } 41 }
42 42
43 DialRegistry::~DialRegistry() { 43 DialRegistry::~DialRegistry() {
44 DCHECK(thread_checker_.CalledOnValidThread()); 44 DCHECK(thread_checker_.CalledOnValidThread());
45 DCHECK_EQ(0, num_listeners_);
46 NetworkChangeNotifier::RemoveNetworkChangeObserver(this); 45 NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
47 } 46 }
48 47
49 DialService* DialRegistry::CreateDialService() { 48 DialService* DialRegistry::CreateDialService() {
50 DCHECK(g_browser_process->net_log()); 49 DCHECK(g_browser_process->net_log());
51 return new DialServiceImpl(g_browser_process->net_log()); 50 return new DialServiceImpl(g_browser_process->net_log());
52 } 51 }
53 52
54 void DialRegistry::ClearDialService() { 53 void DialRegistry::ClearDialService() {
55 dial_.reset(); 54 dial_.reset();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 case NetworkChangeNotifier::CONNECTION_BLUETOOTH: 321 case NetworkChangeNotifier::CONNECTION_BLUETOOTH:
323 if (!dial_.get()) { 322 if (!dial_.get()) {
324 VLOG(2) << "Connection detected, restarting discovery."; 323 VLOG(2) << "Connection detected, restarting discovery.";
325 StartPeriodicDiscovery(); 324 StartPeriodicDiscovery();
326 } 325 }
327 break; 326 break;
328 } 327 }
329 } 328 }
330 329
331 } // namespace extensions 330 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698