Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/storage/FilterStorage.cpp

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: Fix debug.h to be aligned with assert2 (define vs function) and get rid of a warning in generator.cpp Created Nov. 21, 2017, 2:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include <vector> 18 #include <vector>
19 19
20 #include "FilterStorage.h" 20 #include "FilterStorage.h"
21 #include "../filter/Filter.h" 21 #include "../filter/Filter.h"
22 #include "../subscription/UserDefinedSubscription.h" 22 #include "../subscription/UserDefinedSubscription.h"
23 #include "../FilterNotifier.h" 23 #include "../FilterNotifier.h"
24 24
25 ABP_NS_USING
26
25 FilterStorage* FilterStorage::mInstance = new FilterStorage(); 27 FilterStorage* FilterStorage::mInstance = new FilterStorage();
26 28
27 FilterStorage::Subscriptions::size_type FilterStorage::GetSubscriptionCount() co nst 29 FilterStorage::Subscriptions::size_type FilterStorage::GetSubscriptionCount() co nst
28 { 30 {
29 return mSubscriptions.size(); 31 return mSubscriptions.size();
30 } 32 }
31 33
32 Subscription* FilterStorage::SubscriptionAt(FilterStorage::Subscriptions::size_t ype index) const 34 Subscription* FilterStorage::SubscriptionAt(FilterStorage::Subscriptions::size_t ype index) const
33 { 35 {
34 if (index >= mSubscriptions.size()) 36 if (index >= mSubscriptions.size())
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 132
131 mSubscriptions.erase(mSubscriptions.begin() + oldPos); 133 mSubscriptions.erase(mSubscriptions.begin() + oldPos);
132 mSubscriptions.emplace(mSubscriptions.begin() + newPos, &subscription); 134 mSubscriptions.emplace(mSubscriptions.begin() + newPos, &subscription);
133 135
134 FilterNotifier::SubscriptionChange( 136 FilterNotifier::SubscriptionChange(
135 FilterNotifier::Topic::SUBSCRIPTION_MOVED, 137 FilterNotifier::Topic::SUBSCRIPTION_MOVED,
136 subscription 138 subscription
137 ); 139 );
138 return true; 140 return true;
139 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld