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

Side by Side Diff: chrome/browser/extensions/api/processes/processes_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 #include "chrome/browser/extensions/api/processes/processes_api.h" 5 #include "chrome/browser/extensions/api/processes/processes_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 void ProcessesAPI::Shutdown() { 503 void ProcessesAPI::Shutdown() {
504 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 504 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
505 } 505 }
506 506
507 static base::LazyInstance<ProfileKeyedAPIFactory<ProcessesAPI> > 507 static base::LazyInstance<ProfileKeyedAPIFactory<ProcessesAPI> >
508 g_factory = LAZY_INSTANCE_INITIALIZER; 508 g_factory = LAZY_INSTANCE_INITIALIZER;
509 509
510 // static 510 // static
511 ProfileKeyedAPIFactory<ProcessesAPI>* ProcessesAPI::GetFactoryInstance() { 511 ProfileKeyedAPIFactory<ProcessesAPI>* ProcessesAPI::GetFactoryInstance() {
512 return &g_factory.Get(); 512 return g_factory.Pointer();
513 } 513 }
514 514
515 // static 515 // static
516 ProcessesAPI* ProcessesAPI::Get(Profile* profile) { 516 ProcessesAPI* ProcessesAPI::Get(Profile* profile) {
517 return ProfileKeyedAPIFactory<ProcessesAPI>::GetForProfile(profile); 517 return ProfileKeyedAPIFactory<ProcessesAPI>::GetForProfile(profile);
518 } 518 }
519 519
520 ProcessesEventRouter* ProcessesAPI::processes_event_router() { 520 ProcessesEventRouter* ProcessesAPI::processes_event_router() {
521 if (!processes_event_router_) 521 if (!processes_event_router_)
522 processes_event_router_.reset(new ProcessesEventRouter(profile_)); 522 processes_event_router_.reset(new ProcessesEventRouter(profile_));
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 758
759 SetResult(processes); 759 SetResult(processes);
760 SendResponse(true); 760 SendResponse(true);
761 761
762 // Balance the AddRef in the RunImpl. 762 // Balance the AddRef in the RunImpl.
763 Release(); 763 Release();
764 #endif // defined(ENABLE_TASK_MANAGER) 764 #endif // defined(ENABLE_TASK_MANAGER)
765 } 765 }
766 766
767 } // namespace extensions 767 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_api.cc ('k') | chrome/browser/extensions/api/profile_keyed_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698