| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/activity_log.h" | 5 #include "chrome/browser/extensions/activity_log.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 DISALLOW_COPY_AND_ASSIGN(KillActivityDatabaseErrorDelegate); | 123 DISALLOW_COPY_AND_ASSIGN(KillActivityDatabaseErrorDelegate); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // ActivityLogFactory | 126 // ActivityLogFactory |
| 127 | 127 |
| 128 ActivityLogFactory* ActivityLogFactory::GetInstance() { | 128 ActivityLogFactory* ActivityLogFactory::GetInstance() { |
| 129 return Singleton<ActivityLogFactory>::get(); | 129 return Singleton<ActivityLogFactory>::get(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 ProfileKeyedService* ActivityLogFactory::BuildServiceInstanceFor( | 132 ProfileKeyedService* ActivityLogFactory::BuildServiceInstanceFor( |
| 133 Profile* profile) const { | 133 content::BrowserContext* profile) const { |
| 134 return new ActivityLog(profile); | 134 return new ActivityLog(static_cast<Profile*>(profile)); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool ActivityLogFactory::ServiceRedirectedInIncognito() const { | 137 bool ActivityLogFactory::ServiceRedirectedInIncognito() const { |
| 138 return true; | 138 return true; |
| 139 } | 139 } |
| 140 | 140 |
| 141 // ActivityLog | 141 // ActivityLog |
| 142 | 142 |
| 143 // Use GetInstance instead of directly creating an ActivityLog. | 143 // Use GetInstance instead of directly creating an ActivityLog. |
| 144 ActivityLog::ActivityLog(Profile* profile) { | 144 ActivityLog::ActivityLog(Profile* profile) { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 return "content_script"; | 431 return "content_script"; |
| 432 case ActivityLog::ACTIVITY_EVENT_DISPATCH: | 432 case ActivityLog::ACTIVITY_EVENT_DISPATCH: |
| 433 return "event_dispatch"; | 433 return "event_dispatch"; |
| 434 default: | 434 default: |
| 435 NOTREACHED(); | 435 NOTREACHED(); |
| 436 return ""; | 436 return ""; |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace extensions | 440 } // namespace extensions |
| OLD | NEW |