| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "extensions/common/features/feature_provider.h" | 25 #include "extensions/common/features/feature_provider.h" |
| 26 | 26 |
| 27 namespace extensions { | 27 namespace extensions { |
| 28 | 28 |
| 29 namespace activity_log_private = api::activity_log_private; | 29 namespace activity_log_private = api::activity_log_private; |
| 30 | 30 |
| 31 using activity_log_private::ActivityResultSet; | 31 using activity_log_private::ActivityResultSet; |
| 32 using activity_log_private::ExtensionActivity; | 32 using activity_log_private::ExtensionActivity; |
| 33 using activity_log_private::Filter; | 33 using activity_log_private::Filter; |
| 34 | 34 |
| 35 static base::LazyInstance<BrowserContextKeyedAPIFactory<ActivityLogAPI> > | 35 static base::LazyInstance< |
| 36 g_factory = LAZY_INSTANCE_INITIALIZER; | 36 BrowserContextKeyedAPIFactory<ActivityLogAPI>>::DestructorAtExit g_factory = |
| 37 LAZY_INSTANCE_INITIALIZER; |
| 37 | 38 |
| 38 // static | 39 // static |
| 39 BrowserContextKeyedAPIFactory<ActivityLogAPI>* | 40 BrowserContextKeyedAPIFactory<ActivityLogAPI>* |
| 40 ActivityLogAPI::GetFactoryInstance() { | 41 ActivityLogAPI::GetFactoryInstance() { |
| 41 return g_factory.Pointer(); | 42 return g_factory.Pointer(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 template <> | 45 template <> |
| 45 void | 46 void |
| 46 BrowserContextKeyedAPIFactory<ActivityLogAPI>::DeclareFactoryDependencies() { | 47 BrowserContextKeyedAPIFactory<ActivityLogAPI>::DeclareFactoryDependencies() { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 for (const std::string& url : urls) | 212 for (const std::string& url : urls) |
| 212 gurls.push_back(GURL(url)); | 213 gurls.push_back(GURL(url)); |
| 213 | 214 |
| 214 ActivityLog* activity_log = ActivityLog::GetInstance(browser_context()); | 215 ActivityLog* activity_log = ActivityLog::GetInstance(browser_context()); |
| 215 DCHECK(activity_log); | 216 DCHECK(activity_log); |
| 216 activity_log->RemoveURLs(gurls); | 217 activity_log->RemoveURLs(gurls); |
| 217 return RespondNow(NoArguments()); | 218 return RespondNow(NoArguments()); |
| 218 } | 219 } |
| 219 | 220 |
| 220 } // namespace extensions | 221 } // namespace extensions |
| OLD | NEW |