OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |