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

Delta Between Two Patch Sets: src/FilterEngine.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Created April 11, 2017, 1:58 p.m.
Right Patch Set: the input stream is no longer const. Created April 12, 2017, 3:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/FileSystemJsObject.cpp ('k') | src/GlobalJsObject.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 auto prefValue = GetPref("allowed_connection_type"); 513 auto prefValue = GetPref("allowed_connection_type");
514 if (prefValue->AsString().empty()) 514 if (prefValue->AsString().empty())
515 return nullptr; 515 return nullptr;
516 return std::unique_ptr<std::string>(new std::string(prefValue->AsString())); 516 return std::unique_ptr<std::string>(new std::string(prefValue->AsString()));
517 } 517 }
518 518
519 void FilterEngine::FilterChanged(const FilterEngine::FilterChangeCallback& callb ack, const JsValueList& params) const 519 void FilterEngine::FilterChanged(const FilterEngine::FilterChangeCallback& callb ack, const JsValueList& params) const
520 { 520 {
521 std::string action(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsS tring() : ""); 521 std::string action(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsS tring() : "");
522 JsValuePtr item(params.size() >= 2 ? params[1] : jsEngine->NewValue(false)); 522 JsValuePtr item(params.size() >= 2 ? params[1] : jsEngine->NewValue(false));
523 callback(action, item); 523 callback(action, *item);
524 } 524 }
525 525
526 void FilterEngine::ShowNotification(const ShowNotificationCallback& callback, 526 void FilterEngine::ShowNotification(const ShowNotificationCallback& callback,
527 const JsValueList& params) const 527 const JsValueList& params) const
528 { 528 {
529 if (params.size() < 1) 529 if (params.size() < 1)
530 return; 530 return;
531 531
532 if (!params[0]->IsObject()) 532 if (!params[0]->IsObject())
533 { 533 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent Url); 574 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent Url);
575 if (filter) 575 if (filter)
576 { 576 {
577 return filter; 577 return filter;
578 } 578 }
579 currentUrl = parentUrl; 579 currentUrl = parentUrl;
580 } 580 }
581 while (urlIterator != documentUrls.end()); 581 while (urlIterator != documentUrls.end());
582 return FilterPtr(); 582 return FilterPtr();
583 } 583 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld