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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_api.h

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: Add TODO 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 | « no previous file | chrome/browser/extensions/api/dial/dial_registry.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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/api/dial/dial_device_data.h" 10 #include "chrome/browser/extensions/api/dial/dial_device_data.h"
11 #include "chrome/browser/extensions/api/dial/dial_registry.h" 11 #include "chrome/browser/extensions/api/dial/dial_registry.h"
12 #include "components/keyed_service/core/refcounted_keyed_service.h" 12 #include "components/keyed_service/core/refcounted_keyed_service.h"
13 #include "extensions/browser/api/async_api_function.h" 13 #include "extensions/browser/api/async_api_function.h"
14 #include "extensions/browser/event_router.h" 14 #include "extensions/browser/event_router.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class DialRegistry; 18 class DialRegistry;
19 19
20 // Dial API which is a ref-counted KeyedService that manages 20 // Dial API which is a ref-counted KeyedService that manages
21 // the DIAL registry. It takes care of creating the registry on the IO thread 21 // the DIAL registry. It takes care of creating the registry on the IO thread
22 // and is an observer of the registry. It makes sure devices events are sent out 22 // and is an observer of the registry. It makes sure devices events are sent out
23 // to extension listeners on the right thread. 23 // to extension listeners on the right thread.
24 //
25 // TODO(mfoltz): This should probably inherit from BrowserContextKeyedAPI
26 // instead, as there is nothing refcounted on the UI thread we are explicitly
27 // managing here; ShutdownOnUIThread below is a no-op.
Wez 2015/02/19 22:48:32 This comment's pretty confusing; are you saying th
24 class DialAPI : public RefcountedKeyedService, 28 class DialAPI : public RefcountedKeyedService,
25 public EventRouter::Observer, 29 public EventRouter::Observer,
26 public DialRegistry::Observer { 30 public DialRegistry::Observer {
27 public: 31 public:
28 explicit DialAPI(Profile* profile); 32 explicit DialAPI(Profile* profile);
29 33
30 // The DialRegistry for the API. This must always be used only from the IO 34 // The DialRegistry for the API. This must always be used only from the IO
31 // thread. 35 // thread.
32 DialRegistry* dial_registry(); 36 DialRegistry* dial_registry();
33 37
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 bool result_; 97 bool result_;
94 98
95 DISALLOW_COPY_AND_ASSIGN(DialDiscoverNowFunction); 99 DISALLOW_COPY_AND_ASSIGN(DialDiscoverNowFunction);
96 }; 100 };
97 101
98 } // namespace api 102 } // namespace api
99 103
100 } // namespace extensions 104 } // namespace extensions
101 105
102 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ 106 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/dial/dial_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698