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

Unified Diff: jni/AndroidLogSystem.cpp

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.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
« no previous file with comments | « jni/AndroidLogSystem.h ('k') | jni/AndroidWebRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jni/AndroidLogSystem.cpp
diff --git a/jni/AndroidLogSystem.cpp b/jni/AndroidLogSystem.cpp
deleted file mode 100644
index 06a0445f89c78b26a6829d45611e01fa7dac7c82..0000000000000000000000000000000000000000
--- a/jni/AndroidLogSystem.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * 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 <android/log.h>
-#include "AndroidLogSystem.h"
-
-void AndroidLogSystem::operator()(AdblockPlus::LogSystem::LogLevel logLevel,
- const std::string& message, const std::string& source)
-{
- int lvl = ANDROID_LOG_DEFAULT;
- switch (logLevel)
- {
- case LOG_LEVEL_TRACE:
- lvl = ANDROID_LOG_VERBOSE;
- break;
- case LOG_LEVEL_LOG:
- lvl = ANDROID_LOG_DEBUG;
- break;
- case LOG_LEVEL_INFO:
- lvl = ANDROID_LOG_INFO;
- break;
- case LOG_LEVEL_WARN:
- lvl = ANDROID_LOG_WARN;
- break;
- case LOG_LEVEL_ERROR:
- lvl = ANDROID_LOG_ERROR;
- break;
- }
- __android_log_print(lvl, "JS", "%s", message.c_str());
- if (source.size())
- {
- __android_log_print(lvl, "JS", "\n");
- __android_log_print(lvl, "JS", " at ");
- __android_log_print(lvl, "JS", "%s", source.c_str());
- }
- __android_log_print(lvl, "JS", "\n");
-}
« no previous file with comments | « jni/AndroidLogSystem.h ('k') | jni/AndroidWebRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld