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

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

Issue 877993003: Pass FROM_HERE to ObserverListThreadSafe::Notify to improve profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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/activity_log.h" 5 #include "chrome/browser/extensions/activity_log/activity_log.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 dom_verb == DomActionType::METHOD) { 538 dom_verb == DomActionType::METHOD) {
539 other->SetInteger(constants::kActionDomVerb, DomActionType::XHR); 539 other->SetInteger(constants::kActionDomVerb, DomActionType::XHR);
540 } 540 }
541 } 541 }
542 542
543 if (uma_policy_) 543 if (uma_policy_)
544 uma_policy_->ProcessAction(action); 544 uma_policy_->ProcessAction(action);
545 if (IsDatabaseEnabled() && database_policy_) 545 if (IsDatabaseEnabled() && database_policy_)
546 database_policy_->ProcessAction(action); 546 database_policy_->ProcessAction(action);
547 if (IsWatchdogAppActive()) 547 if (IsWatchdogAppActive())
548 observers_->Notify(&Observer::OnExtensionActivity, action); 548 observers_->Notify(FROM_HERE, &Observer::OnExtensionActivity, action);
549 if (testing_mode_) 549 if (testing_mode_)
550 VLOG(1) << action->PrintForDebug(); 550 VLOG(1) << action->PrintForDebug();
551 } 551 }
552 552
553 void ActivityLog::OnScriptsExecuted( 553 void ActivityLog::OnScriptsExecuted(
554 const content::WebContents* web_contents, 554 const content::WebContents* web_contents,
555 const ExecutingScriptsMap& extension_ids, 555 const ExecutingScriptsMap& extension_ids,
556 const GURL& on_url) { 556 const GURL& on_url) {
557 Profile* profile = 557 Profile* profile =
558 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 558 Profile::FromBrowserContext(web_contents->GetBrowserContext());
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 database_policy_->DeleteDatabase(); 674 database_policy_->DeleteDatabase();
675 } 675 }
676 676
677 template <> 677 template <>
678 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { 678 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() {
679 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 679 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
680 DependsOn(ExtensionRegistryFactory::GetInstance()); 680 DependsOn(ExtensionRegistryFactory::GetInstance());
681 } 681 }
682 682
683 } // namespace extensions 683 } // namespace extensions
OLDNEW
« no previous file with comments | « base/system_monitor/system_monitor.cc ('k') | chrome/browser/extensions/api/storage/policy_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698