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

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

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 action->mutable_args()->AppendString(*it2); 610 action->mutable_args()->AppendString(*it2);
611 } 611 }
612 LogAction(action); 612 LogAction(action);
613 } 613 }
614 } 614 }
615 } 615 }
616 616
617 void ActivityLog::OnApiEventDispatched(const std::string& extension_id, 617 void ActivityLog::OnApiEventDispatched(const std::string& extension_id,
618 const std::string& event_name, 618 const std::string& event_name,
619 scoped_ptr<base::ListValue> event_args) { 619 scoped_ptr<base::ListValue> event_args) {
620 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 620 DCHECK_CURRENTLY_ON(BrowserThread::UI);
621 scoped_refptr<Action> action = new Action(extension_id, 621 scoped_refptr<Action> action = new Action(extension_id,
622 base::Time::Now(), 622 base::Time::Now(),
623 Action::ACTION_API_EVENT, 623 Action::ACTION_API_EVENT,
624 event_name); 624 event_name);
625 action->set_args(event_args.Pass()); 625 action->set_args(event_args.Pass());
626 LogAction(action); 626 LogAction(action);
627 } 627 }
628 628
629 void ActivityLog::OnApiFunctionCalled(const std::string& extension_id, 629 void ActivityLog::OnApiFunctionCalled(const std::string& extension_id,
630 const std::string& api_name, 630 const std::string& api_name,
631 scoped_ptr<base::ListValue> args) { 631 scoped_ptr<base::ListValue> args) {
632 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 632 DCHECK_CURRENTLY_ON(BrowserThread::UI);
633 scoped_refptr<Action> action = new Action(extension_id, 633 scoped_refptr<Action> action = new Action(extension_id,
634 base::Time::Now(), 634 base::Time::Now(),
635 Action::ACTION_API_CALL, 635 Action::ACTION_API_CALL,
636 api_name); 636 api_name);
637 action->set_args(args.Pass()); 637 action->set_args(args.Pass());
638 LogAction(action); 638 LogAction(action);
639 } 639 }
640 640
641 // LOOKUP ACTIONS. ------------------------------------------------------------- 641 // LOOKUP ACTIONS. -------------------------------------------------------------
642 642
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 database_policy_->DeleteDatabase(); 695 database_policy_->DeleteDatabase();
696 } 696 }
697 697
698 template <> 698 template <>
699 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { 699 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() {
700 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 700 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
701 DependsOn(InstallTrackerFactory::GetInstance()); 701 DependsOn(InstallTrackerFactory::GetInstance());
702 } 702 }
703 703
704 } // namespace extensions 704 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698