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

Side by Side Diff: extensions/common/event_matcher.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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
« no previous file with comments | « extensions/common/event_matcher.h ('k') | extensions/common/extension.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "extensions/common/event_matcher.h" 5 #include "extensions/common/event_matcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "extensions/common/event_filtering_info.h" 10 #include "extensions/common/event_filtering_info.h"
11 11
12 namespace { 12 namespace {
13 const char kUrlFiltersKey[] = "url"; 13 const char kUrlFiltersKey[] = "url";
14 const char kWindowTypesKey[] = "windowTypes"; 14 const char kWindowTypesKey[] = "windowTypes";
15 } 15 }
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 const char kEventFilterServiceTypeKey[] = "serviceType"; 19 const char kEventFilterServiceTypeKey[] = "serviceType";
20 20
21 EventMatcher::EventMatcher(scoped_ptr<base::DictionaryValue> filter, 21 EventMatcher::EventMatcher(std::unique_ptr<base::DictionaryValue> filter,
22 int routing_id) 22 int routing_id)
23 : filter_(std::move(filter)), routing_id_(routing_id) {} 23 : filter_(std::move(filter)), routing_id_(routing_id) {}
24 24
25 EventMatcher::~EventMatcher() { 25 EventMatcher::~EventMatcher() {
26 } 26 }
27 27
28 bool EventMatcher::MatchNonURLCriteria( 28 bool EventMatcher::MatchNonURLCriteria(
29 const EventFilteringInfo& event_info) const { 29 const EventFilteringInfo& event_info) const {
30 if (event_info.has_instance_id()) { 30 if (event_info.has_instance_id()) {
31 return event_info.instance_id() == GetInstanceID(); 31 return event_info.instance_id() == GetInstanceID();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 bool EventMatcher::HasWindowTypes() const { 103 bool EventMatcher::HasWindowTypes() const {
104 return GetWindowTypeCount() != 0; 104 return GetWindowTypeCount() != 0;
105 } 105 }
106 106
107 int EventMatcher::GetRoutingID() const { 107 int EventMatcher::GetRoutingID() const {
108 return routing_id_; 108 return routing_id_;
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/event_matcher.h ('k') | extensions/common/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698