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

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

Issue 12330073: Disable ProfileKeyedServices on import process by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT Created 7 years, 9 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 ProfileKeyedService* ActivityLogFactory::BuildServiceInstanceFor( 132 ProfileKeyedService* ActivityLogFactory::BuildServiceInstanceFor(
133 Profile* profile) const { 133 Profile* profile) const {
134 return new ActivityLog(profile); 134 return new ActivityLog(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 bool ActivityLogFactory::ServiceIsNULLOnImportProcess() const {
142 return false;
143 }
144
141 // ActivityLog 145 // ActivityLog
142 146
143 // Use GetInstance instead of directly creating an ActivityLog. 147 // Use GetInstance instead of directly creating an ActivityLog.
144 ActivityLog::ActivityLog(Profile* profile) { 148 ActivityLog::ActivityLog(Profile* profile) {
145 // enable-extension-activity-logging and enable-extension-activity-ui 149 // enable-extension-activity-logging and enable-extension-activity-ui
146 log_activity_to_stdout_ = CommandLine::ForCurrentProcess()-> 150 log_activity_to_stdout_ = CommandLine::ForCurrentProcess()->
147 HasSwitch(switches::kEnableExtensionActivityLogging); 151 HasSwitch(switches::kEnableExtensionActivityLogging);
148 log_activity_to_ui_ = CommandLine::ForCurrentProcess()-> 152 log_activity_to_ui_ = CommandLine::ForCurrentProcess()->
149 HasSwitch(switches::kEnableExtensionActivityUI); 153 HasSwitch(switches::kEnableExtensionActivityUI);
150 154
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 return "content_script"; 411 return "content_script";
408 case ActivityLog::ACTIVITY_EVENT_DISPATCH: 412 case ActivityLog::ACTIVITY_EVENT_DISPATCH:
409 return "event_dispatch"; 413 return "event_dispatch";
410 default: 414 default:
411 NOTREACHED(); 415 NOTREACHED();
412 return ""; 416 return "";
413 } 417 }
414 } 418 }
415 419
416 } // namespace extensions 420 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698