| 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 "chrome/browser/extensions/api/streams_private/streams_private_api.h" | 5 #include "chrome/browser/extensions/api/streams_private/streams_private_api.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 extension_id(), GURL(stream_url_), base::Bind( | 174 extension_id(), GURL(stream_url_), base::Bind( |
| 175 &StreamsPrivateAbortFunction::OnClose, this)); | 175 &StreamsPrivateAbortFunction::OnClose, this)); |
| 176 return RespondLater(); | 176 return RespondLater(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void StreamsPrivateAbortFunction::OnClose() { | 179 void StreamsPrivateAbortFunction::OnClose() { |
| 180 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 180 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 181 Respond(NoArguments()); | 181 Respond(NoArguments()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 static base::LazyInstance<BrowserContextKeyedAPIFactory<StreamsPrivateAPI> > | 184 static base::LazyInstance<BrowserContextKeyedAPIFactory<StreamsPrivateAPI>>:: |
| 185 g_factory = LAZY_INSTANCE_INITIALIZER; | 185 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER; |
| 186 | 186 |
| 187 // static | 187 // static |
| 188 BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* | 188 BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* |
| 189 StreamsPrivateAPI::GetFactoryInstance() { | 189 StreamsPrivateAPI::GetFactoryInstance() { |
| 190 return g_factory.Pointer(); | 190 return g_factory.Pointer(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace extensions | 193 } // namespace extensions |
| OLD | NEW |