| 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/media_galleries_private/media_galleries_
private_api.h" | 5 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_
private_api.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 content::BrowserThread::FILE, FROM_HERE, | 104 content::BrowserThread::FILE, FROM_HERE, |
| 105 base::Bind(&HandleProfileShutdownOnFileThread, profile_)); | 105 base::Bind(&HandleProfileShutdownOnFileThread, profile_)); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static base::LazyInstance<ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI> > | 108 static base::LazyInstance<ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI> > |
| 109 g_factory = LAZY_INSTANCE_INITIALIZER; | 109 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 110 | 110 |
| 111 // static | 111 // static |
| 112 ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>* | 112 ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>* |
| 113 MediaGalleriesPrivateAPI::GetFactoryInstance() { | 113 MediaGalleriesPrivateAPI::GetFactoryInstance() { |
| 114 return &g_factory.Get(); | 114 return g_factory.Pointer(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 // static | 117 // static |
| 118 MediaGalleriesPrivateAPI* MediaGalleriesPrivateAPI::Get(Profile* profile) { | 118 MediaGalleriesPrivateAPI* MediaGalleriesPrivateAPI::Get(Profile* profile) { |
| 119 return | 119 return |
| 120 ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>::GetForProfile(profile); | 120 ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>::GetForProfile(profile); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void MediaGalleriesPrivateAPI::OnListenerAdded( | 123 void MediaGalleriesPrivateAPI::OnListenerAdded( |
| 124 const EventListenerInfo& details) { | 124 const EventListenerInfo& details) { |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 | 419 |
| 420 SetResult(result_list); | 420 SetResult(result_list); |
| 421 SendResponse(true); | 421 SendResponse(true); |
| 422 | 422 |
| 423 return true; | 423 return true; |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace extensions | 426 } // namespace extensions |
| OLD | NEW |