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

Side by Side Diff: chrome/browser/extensions/api/cookies/cookies_api.cc

Issue 140613002: Cleanup: Replace &LazyInstance::Get() with LazyInstance::Pointer(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 Cookies API. 5 // Implements the Chrome Extensions Cookies API.
6 6
7 #include "chrome/browser/extensions/api/cookies/cookies_api.h" 7 #include "chrome/browser/extensions/api/cookies/cookies_api.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 569
570 void CookiesAPI::Shutdown() { 570 void CookiesAPI::Shutdown() {
571 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 571 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
572 } 572 }
573 573
574 static base::LazyInstance<ProfileKeyedAPIFactory<CookiesAPI> > 574 static base::LazyInstance<ProfileKeyedAPIFactory<CookiesAPI> >
575 g_factory = LAZY_INSTANCE_INITIALIZER; 575 g_factory = LAZY_INSTANCE_INITIALIZER;
576 576
577 // static 577 // static
578 ProfileKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() { 578 ProfileKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() {
579 return &g_factory.Get(); 579 return g_factory.Pointer();
580 } 580 }
581 581
582 void CookiesAPI::OnListenerAdded( 582 void CookiesAPI::OnListenerAdded(
583 const extensions::EventListenerInfo& details) { 583 const extensions::EventListenerInfo& details) {
584 cookies_event_router_.reset(new CookiesEventRouter(profile_)); 584 cookies_event_router_.reset(new CookiesEventRouter(profile_));
585 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 585 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
586 } 586 }
587 587
588 } // namespace extensions 588 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698