| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gcd_private/gcd_private_api.h" | 5 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 void GcdPrivateAPIImpl::RemoveSessionDelayed(int session_id) { | 218 void GcdPrivateAPIImpl::RemoveSessionDelayed(int session_id) { |
| 219 base::ThreadTaskRunnerHandle::Get()->PostTask( | 219 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 220 FROM_HERE, base::Bind(&GcdPrivateAPIImpl::RemoveSession, | 220 FROM_HERE, base::Bind(&GcdPrivateAPIImpl::RemoveSession, |
| 221 weak_ptr_factory_.GetWeakPtr(), session_id)); | 221 weak_ptr_factory_.GetWeakPtr(), session_id)); |
| 222 } | 222 } |
| 223 | 223 |
| 224 scoped_ptr<base::ListValue> GcdPrivateAPIImpl::GetPrefetchedSSIDList() { | 224 scoped_ptr<base::ListValue> GcdPrivateAPIImpl::GetPrefetchedSSIDList() { |
| 225 scoped_ptr<base::ListValue> retval(new base::ListValue); | 225 scoped_ptr<base::ListValue> retval(new base::ListValue); |
| 226 | 226 |
| 227 return retval.Pass(); | 227 return retval; |
| 228 } | 228 } |
| 229 | 229 |
| 230 | 230 |
| 231 | 231 |
| 232 GcdPrivateAPI::GcdPrivateAPI(content::BrowserContext* context) | 232 GcdPrivateAPI::GcdPrivateAPI(content::BrowserContext* context) |
| 233 : impl_(new GcdPrivateAPIImpl(context)) { | 233 : impl_(new GcdPrivateAPIImpl(context)) { |
| 234 } | 234 } |
| 235 | 235 |
| 236 GcdPrivateAPI::~GcdPrivateAPI() { | 236 GcdPrivateAPI::~GcdPrivateAPI() { |
| 237 } | 237 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 GcdPrivateAPIImpl* gcd_api = GcdPrivateAPIImpl::Get(GetProfile()); | 436 GcdPrivateAPIImpl* gcd_api = GcdPrivateAPIImpl::Get(GetProfile()); |
| 437 | 437 |
| 438 gcd_api->RemoveSession(params->session_id); | 438 gcd_api->RemoveSession(params->session_id); |
| 439 | 439 |
| 440 SendResponse(true); | 440 SendResponse(true); |
| 441 return true; | 441 return true; |
| 442 } | 442 } |
| 443 | 443 |
| 444 } // namespace extensions | 444 } // namespace extensions |
| OLD | NEW |