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

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

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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 <stddef.h> 7 #include <stddef.h>
8
9 #include <set> 8 #include <set>
9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/json/json_string_value_serializer.h" 13 #include "base/json/json_string_value_serializer.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/threading/thread_checker.h" 19 #include "base/threading/thread_checker.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 580
581 void ActivityLog::OnApiEventDispatched(const std::string& extension_id, 581 void ActivityLog::OnApiEventDispatched(const std::string& extension_id,
582 const std::string& event_name, 582 const std::string& event_name,
583 scoped_ptr<base::ListValue> event_args) { 583 scoped_ptr<base::ListValue> event_args) {
584 DCHECK_CURRENTLY_ON(BrowserThread::UI); 584 DCHECK_CURRENTLY_ON(BrowserThread::UI);
585 scoped_refptr<Action> action = new Action(extension_id, 585 scoped_refptr<Action> action = new Action(extension_id,
586 base::Time::Now(), 586 base::Time::Now(),
587 Action::ACTION_API_EVENT, 587 Action::ACTION_API_EVENT,
588 event_name); 588 event_name);
589 action->set_args(event_args.Pass()); 589 action->set_args(std::move(event_args));
590 LogAction(action); 590 LogAction(action);
591 } 591 }
592 592
593 void ActivityLog::OnApiFunctionCalled(const std::string& extension_id, 593 void ActivityLog::OnApiFunctionCalled(const std::string& extension_id,
594 const std::string& api_name, 594 const std::string& api_name,
595 scoped_ptr<base::ListValue> args) { 595 scoped_ptr<base::ListValue> args) {
596 DCHECK_CURRENTLY_ON(BrowserThread::UI); 596 DCHECK_CURRENTLY_ON(BrowserThread::UI);
597 scoped_refptr<Action> action = new Action(extension_id, 597 scoped_refptr<Action> action = new Action(extension_id,
598 base::Time::Now(), 598 base::Time::Now(),
599 Action::ACTION_API_CALL, 599 Action::ACTION_API_CALL,
600 api_name); 600 api_name);
601 action->set_args(args.Pass()); 601 action->set_args(std::move(args));
602 LogAction(action); 602 LogAction(action);
603 } 603 }
604 604
605 // LOOKUP ACTIONS. ------------------------------------------------------------- 605 // LOOKUP ACTIONS. -------------------------------------------------------------
606 606
607 void ActivityLog::GetFilteredActions( 607 void ActivityLog::GetFilteredActions(
608 const std::string& extension_id, 608 const std::string& extension_id,
609 const Action::ActionType type, 609 const Action::ActionType type,
610 const std::string& api_name, 610 const std::string& api_name,
611 const std::string& page_url, 611 const std::string& page_url,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 database_policy_->DeleteDatabase(); 659 database_policy_->DeleteDatabase();
660 } 660 }
661 661
662 template <> 662 template <>
663 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { 663 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() {
664 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 664 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
665 DependsOn(ExtensionRegistryFactory::GetInstance()); 665 DependsOn(ExtensionRegistryFactory::GetInstance());
666 } 666 }
667 667
668 } // namespace extensions 668 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/activity_log/activity_actions.cc ('k') | chrome/browser/extensions/activity_log/counting_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698