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

Side by Side Diff: chrome/browser/extensions/api/history/history_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/history/history_api.h" 5 #include "chrome/browser/extensions/api/history/history_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void HistoryAPI::Shutdown() { 213 void HistoryAPI::Shutdown() {
214 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 214 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
215 } 215 }
216 216
217 static base::LazyInstance<ProfileKeyedAPIFactory<HistoryAPI> > 217 static base::LazyInstance<ProfileKeyedAPIFactory<HistoryAPI> >
218 g_factory = LAZY_INSTANCE_INITIALIZER; 218 g_factory = LAZY_INSTANCE_INITIALIZER;
219 219
220 // static 220 // static
221 ProfileKeyedAPIFactory<HistoryAPI>* HistoryAPI::GetFactoryInstance() { 221 ProfileKeyedAPIFactory<HistoryAPI>* HistoryAPI::GetFactoryInstance() {
222 return &g_factory.Get(); 222 return g_factory.Pointer();
223 } 223 }
224 224
225 template<> 225 template<>
226 void ProfileKeyedAPIFactory<HistoryAPI>::DeclareFactoryDependencies() { 226 void ProfileKeyedAPIFactory<HistoryAPI>::DeclareFactoryDependencies() {
227 DependsOn(ActivityLogFactory::GetInstance()); 227 DependsOn(ActivityLogFactory::GetInstance());
228 } 228 }
229 229
230 void HistoryAPI::OnListenerAdded(const EventListenerInfo& details) { 230 void HistoryAPI::OnListenerAdded(const EventListenerInfo& details) {
231 history_event_router_.reset(new HistoryEventRouter(profile_)); 231 history_event_router_.reset(new HistoryEventRouter(profile_));
232 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 232 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 479
480 return true; 480 return true;
481 } 481 }
482 482
483 void HistoryDeleteAllFunction::DeleteComplete() { 483 void HistoryDeleteAllFunction::DeleteComplete() {
484 SendAsyncResponse(); 484 SendAsyncResponse();
485 } 485 }
486 486
487 } // namespace extensions 487 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698