Introduction {#s1}
Q:
Python convert
As the number of c
Category Archives:
---
abstract: 'In
Ruthie has been wo
The New York State
As we prepare to c
How to Write a Win
Category Archives:// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_LOGGING_ANDROID_LOGGING_EVENT_H_
#define CHROME_BROWSER_ANDROID_LOGGING_ANDROID_LOGGING_EVENT_H_
#include "base/android/jni_android.h"
#include "base/strings/string16.h"
namespace logging {
// Defines android:log message for android logging.
// Note: The android: prefix is added in Java.
#define LOGCAT_ANDROID(title) \
jni->AddStringUTF16(reinterpret_cast(title))
#define LOG(severity, ...) \
jni->CallStaticBooleanMethod(JavaLogging::java_logging_##severity, \
JavaLogging::java_logging_##severity##_LOGGING_TAG, \
reinterpret_cast(true), __VA_ARGS__)
#define LOG_IF(severity, condition, ...) \
jni->CallStaticBooleanMethod(JavaLogging::java_logging_##severity, \
JavaLogging::java_logging_##severity##_LOGGING_TAG, \
reinterpret_cast(condition), __VA_ARGS__)
#define REQUEST_LOG(condition) \
if (!JavaLogging::java_logging_##condition##_LOGGING_TAG.CallBooleanMethod( \
reinterpret_cast(true))) \
return false;
#define LOG_ASSERT(condition, ...) \
if (!(condition)) { \
jni->CallStaticVoidMethod( \
JavaLogging::java_logging_##JavaLogging::java_logging_assertion_##JavaLogging::java_logging_assertion_##JavaLogging::ASSERT_TAG, \
reinterpret_cast(#condition), __VA_ARGS__); \
} \
return condition;
} // namespace logging
#endif // CHROME_BROWSER_ANDROID_LOGGING_ANDROID_LOGGING_EVENT_H_