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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 // Implements the Chrome Extensions Media Galleries API. 5 // Implements the Chrome Extensions Media Galleries API.
6 6
7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 void MediaGalleriesEventRouter::Shutdown() { 309 void MediaGalleriesEventRouter::Shutdown() {
310 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 310 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
311 weak_ptr_factory_.InvalidateWeakPtrs(); 311 weak_ptr_factory_.InvalidateWeakPtrs();
312 312
313 EventRouter::Get(profile_)->UnregisterObserver(this); 313 EventRouter::Get(profile_)->UnregisterObserver(this);
314 314
315 gallery_watch_manager()->RemoveObserver(profile_); 315 gallery_watch_manager()->RemoveObserver(profile_);
316 } 316 }
317 317
318 static base::LazyInstance< 318 static base::LazyInstance<
319 BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter> > g_factory = 319 BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>>::DestructorAtExit
320 LAZY_INSTANCE_INITIALIZER; 320 g_factory = LAZY_INSTANCE_INITIALIZER;
321 321
322 // static 322 // static
323 BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>* 323 BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>*
324 MediaGalleriesEventRouter::GetFactoryInstance() { 324 MediaGalleriesEventRouter::GetFactoryInstance() {
325 return g_factory.Pointer(); 325 return g_factory.Pointer();
326 } 326 }
327 327
328 // static 328 // static
329 MediaGalleriesEventRouter* MediaGalleriesEventRouter::Get( 329 MediaGalleriesEventRouter* MediaGalleriesEventRouter::Get(
330 content::BrowserContext* context) { 330 content::BrowserContext* context) {
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 SendResponse(false); 907 SendResponse(false);
908 return; 908 return;
909 } 909 }
910 910
911 gallery_watch_manager()->RemoveWatch( 911 gallery_watch_manager()->RemoveWatch(
912 GetProfile(), extension_id(), gallery_pref_id); 912 GetProfile(), extension_id(), gallery_pref_id);
913 SendResponse(true); 913 SendResponse(true);
914 } 914 }
915 915
916 } // namespace extensions 916 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/mdns/mdns_api.cc ('k') | chrome/browser/extensions/api/messaging/incognito_connectability.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698