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

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

Issue 16759002: Disable Activity Log in non-AL browser tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 5 #include <set>
6 #include <vector> 6 #include <vector>
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 // We can't register for the InstallTrackerFactory events or talk to the 185 // We can't register for the InstallTrackerFactory events or talk to the
186 // extension service in the constructor, so we do that here the first time 186 // extension service in the constructor, so we do that here the first time
187 // this is called (as identified by first_time_checking_). 187 // this is called (as identified by first_time_checking_).
188 bool ActivityLog::IsLogEnabled() { 188 bool ActivityLog::IsLogEnabled() {
189 if (!first_time_checking_) return enabled_; 189 if (!first_time_checking_) return enabled_;
190 if (!has_threads_) return false; 190 if (!has_threads_) return false;
191 tracker_ = InstallTrackerFactory::GetForProfile(profile_); 191 tracker_ = InstallTrackerFactory::GetForProfile(profile_);
192 tracker_->AddObserver(this); 192 tracker_->AddObserver(this);
193 const ExtensionService* extension_service = 193 // TODO(felt): Fix this.
194 /*const ExtensionService* extension_service =
194 ExtensionSystem::Get(profile_)->extension_service(); 195 ExtensionSystem::Get(profile_)->extension_service();
195 if (extension_service->IsExtensionEnabled( 196 if (extension_service->IsExtensionEnabled(
196 kActivityLogExtensionId)) { 197 kActivityLogExtensionId)) {
197 enabled_ = true; 198 enabled_ = true;
198 LogIsEnabled::GetInstance()->SetProfileEnabled(true); 199 LogIsEnabled::GetInstance()->SetProfileEnabled(true);
199 } 200 }*/
200 first_time_checking_ = false; 201 first_time_checking_ = false;
201 return enabled_; 202 return enabled_;
202 } 203 }
203 204
204 void ActivityLog::OnExtensionInstalled(const Extension* extension) { 205 void ActivityLog::OnExtensionInstalled(const Extension* extension) {
205 if (extension->id() != kActivityLogExtensionId) return; 206 if (extension->id() != kActivityLogExtensionId) return;
206 enabled_ = true; 207 enabled_ = true;
207 LogIsEnabled::GetInstance()->SetProfileEnabled(true); 208 LogIsEnabled::GetInstance()->SetProfileEnabled(true);
208 } 209 }
209 210
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 web_contents->GetTitle(), 446 web_contents->GetTitle(),
446 std::string(), // no api call here 447 std::string(), // no api call here
447 script_names.get(), 448 script_names.get(),
448 DomActionType::INSERTED, 449 DomActionType::INSERTED,
449 extra); 450 extra);
450 } 451 }
451 } 452 }
452 } 453 }
453 454
454 } // namespace extensions 455 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698