Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac041d75 authored by Qijiang Fan's avatar Qijiang Fan
Browse files

Create include/check.h to use different headers for CHECK-macros.

A few months ago, Chrome OS libchrome has followed Chrome upstream, to
move CHECK-related macros to base/check.h and base/check_op.h.

An implicit include of base/check.h and base/check_op.h was added to
base/logging.h for short-term backward compatibility until all
CHECK-related usages have been migrated. We're planning to remove this
implicit include soon.

Android is still using older libchrome, and CHECK-related macros lives
in base/logging.h. Thus adding a wrapper header as include/check.h like
include/notreached.h.

include of <base/logging.h> is still kept, and not removed. Because,
base/logging.h is still implicitly included by base/check.h, and this CL
doesn't really look into usages of LOG(). Removing base/logging.h may
accidentally adds implicit usages via base/check.h. We will be removing
the implicit include in base/check.h later. It might be better to keep
base/logging.h and reinvestigate, and remove unnecessary base/logging.h
later to avoid unnecessary blocking items when reomving implicit include
from base/check.h.

Bug: 186486897
Tag: #floss
Test: FEATURES=test emerge-zork-floss floss
Change-Id: I6211d1c5d41623d9df8e7b48c90cf0ce6c64eb72
parent 0e11823b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <string.h>

#include "btcore/include/device_class.h"
#include "check.h"

typedef struct _bt_device_class_t {
  uint32_t unused : 2;  // LSBs
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <mutex>
#include <unordered_map>

#include "check.h"
#include "common/message_loop_thread.h"
#include "osi/include/allocator.h"
#include "osi/include/log.h"
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <base/logging.h>
#include <string.h>
#include "btcore/include/device_class.h"
#include "check.h"
#include "osi/include/allocator.h"
#include "osi/include/compat.h"

+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@

#include <base/logging.h>

#include "check.h"

namespace bluetooth {

namespace common {
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include "btcore/include/event_mask.h"
#include "btcore/include/module.h"
#include "btcore/include/version.h"
#include "check.h"
#include "hcimsgs.h"
#include "main/shim/controller.h"
#include "main/shim/shim.h"
Loading