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

Side by Side Diff: chrome/browser/extensions/activity_log.cc

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 years, 8 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) 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698