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

Side by Side Diff: chrome/browser/extensions/api/activity_log_private/activity_log_private_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/activity_log_private/activity_log_privat e_api.h" 5 #include "chrome/browser/extensions/api/activity_log_private/activity_log_privat e_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 13 matching lines...) Expand all
24 24
25 using api::activity_log_private::ActivityResultSet; 25 using api::activity_log_private::ActivityResultSet;
26 using api::activity_log_private::ExtensionActivity; 26 using api::activity_log_private::ExtensionActivity;
27 using api::activity_log_private::Filter; 27 using api::activity_log_private::Filter;
28 28
29 static base::LazyInstance<ProfileKeyedAPIFactory<ActivityLogAPI> > 29 static base::LazyInstance<ProfileKeyedAPIFactory<ActivityLogAPI> >
30 g_factory = LAZY_INSTANCE_INITIALIZER; 30 g_factory = LAZY_INSTANCE_INITIALIZER;
31 31
32 // static 32 // static
33 ProfileKeyedAPIFactory<ActivityLogAPI>* ActivityLogAPI::GetFactoryInstance() { 33 ProfileKeyedAPIFactory<ActivityLogAPI>* ActivityLogAPI::GetFactoryInstance() {
34 return &g_factory.Get(); 34 return g_factory.Pointer();
35 } 35 }
36 36
37 template<> 37 template<>
38 void ProfileKeyedAPIFactory<ActivityLogAPI>::DeclareFactoryDependencies() { 38 void ProfileKeyedAPIFactory<ActivityLogAPI>::DeclareFactoryDependencies() {
39 DependsOn(ExtensionSystemFactory::GetInstance()); 39 DependsOn(ExtensionSystemFactory::GetInstance());
40 DependsOn(ActivityLogFactory::GetInstance()); 40 DependsOn(ActivityLogFactory::GetInstance());
41 } 41 }
42 42
43 ActivityLogAPI::ActivityLogAPI(Profile* profile) 43 ActivityLogAPI::ActivityLogAPI(Profile* profile)
44 : profile_(profile), 44 : profile_(profile),
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 gurls.push_back(GURL(*it)); 195 gurls.push_back(GURL(*it));
196 } 196 }
197 197
198 ActivityLog* activity_log = ActivityLog::GetInstance(GetProfile()); 198 ActivityLog* activity_log = ActivityLog::GetInstance(GetProfile());
199 DCHECK(activity_log); 199 DCHECK(activity_log);
200 activity_log->RemoveURLs(gurls); 200 activity_log->RemoveURLs(gurls);
201 return true; 201 return true;
202 } 202 }
203 203
204 } // namespace extensions 204 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698