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

Unified Diff: test/UpdateCheck.cpp

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: Created July 11, 2014, 2:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/UpdateCheck.cpp
===================================================================
--- a/test/UpdateCheck.cpp
+++ b/test/UpdateCheck.cpp
@@ -10,23 +10,23 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <AdblockPlus/tr1_functional.h>
+#include <functional>
#include "BaseJsTest.h"
namespace
{
- typedef std::tr1::shared_ptr<AdblockPlus::FilterEngine> FilterEnginePtr;
+ typedef std::shared_ptr<AdblockPlus::FilterEngine> FilterEnginePtr;
void FindAndReplace(std::string& source, const std::string& find, const std::string& replace)
{
for (size_t pos = 0; (pos = source.find(find), pos) != std::string::npos; pos += replace.size())
source.replace(pos, find.size(), replace);
}
std::string previousRequestUrl;
@@ -70,25 +70,25 @@ namespace
void Reset()
{
jsEngine = AdblockPlus::JsEngine::New(appInfo);
jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new LazyLogSystem));
jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem));
jsEngine->SetWebRequest(webRequestPtr);
jsEngine->SetEventCallback("updateAvailable",
- std::tr1::bind(&UpdateCheckTest::EventCallback, this, std::tr1::placeholders::_1));
+ std::bind(&UpdateCheckTest::EventCallback, this, std::placeholders::_1));
filterEngine.reset(new AdblockPlus::FilterEngine(jsEngine));
}
void ForceUpdateCheck()
{
filterEngine->ForceUpdateCheck(
- std::tr1::bind(&UpdateCheckTest::UpdateCallback, this, std::tr1::placeholders::_1));
+ std::bind(&UpdateCheckTest::UpdateCallback, this, std::placeholders::_1));
}
void EventCallback(AdblockPlus::JsValueList& params)
{
eventCallbackCalled = true;
eventCallbackParams = params;
}

Powered by Google App Engine
This is Rietveld