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

Side by Side Diff: chrome/browser/extensions/api/streams_private/streams_private_api.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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
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/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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return; 153 return;
154 } 154 }
155 155
156 url_it->second->AddCloseListener(callback); 156 url_it->second->AddCloseListener(callback);
157 url_map->erase(url_it); 157 url_map->erase(url_it);
158 } 158 }
159 159
160 void StreamsPrivateAPI::OnExtensionUnloaded( 160 void StreamsPrivateAPI::OnExtensionUnloaded(
161 content::BrowserContext* browser_context, 161 content::BrowserContext* browser_context,
162 const Extension* extension, 162 const Extension* extension,
163 UnloadedExtensionInfo::Reason reason) { 163 UnloadedExtensionReason reason) {
164 streams_.erase(extension->id()); 164 streams_.erase(extension->id());
165 } 165 }
166 166
167 StreamsPrivateAbortFunction::StreamsPrivateAbortFunction() { 167 StreamsPrivateAbortFunction::StreamsPrivateAbortFunction() {
168 } 168 }
169 169
170 ExtensionFunction::ResponseAction StreamsPrivateAbortFunction::Run() { 170 ExtensionFunction::ResponseAction StreamsPrivateAbortFunction::Run() {
171 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 171 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
172 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &stream_url_)); 172 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &stream_url_));
173 StreamsPrivateAPI::Get(browser_context())->AbortStream( 173 StreamsPrivateAPI::Get(browser_context())->AbortStream(
(...skipping 10 matching lines...) Expand all
184 static base::LazyInstance<BrowserContextKeyedAPIFactory<StreamsPrivateAPI>>:: 184 static base::LazyInstance<BrowserContextKeyedAPIFactory<StreamsPrivateAPI>>::
185 DestructorAtExit 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698