diff options
author | hashimoto <hashimoto@chromium.org> | 2015-12-18 00:06:12 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 08:06:57 +0000 |
commit | 32e9f8bbd34e924a562530c298148a6647c38817 (patch) | |
tree | 8ed7244f35ee158b08c9436c03920ba5be1d05f7 /chromeos | |
parent | e4a98fb6e22dc9256b1e2004177ea27edb2e2e59 (diff) | |
download | chromium_src-32e9f8bbd34e924a562530c298148a6647c38817.zip chromium_src-32e9f8bbd34e924a562530c298148a6647c38817.tar.gz chromium_src-32e9f8bbd34e924a562530c298148a6647c38817.tar.bz2 |
Fix include guard and add CHROMEOS_EXPORT
BUG=563282
Review URL: https://codereview.chromium.org/1538793002
Cr-Commit-Position: refs/heads/master@{#366045}
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/binder/buffer_reader.h | 9 | ||||
-rw-r--r-- | chromeos/binder/command_broker.h | 4 | ||||
-rw-r--r-- | chromeos/binder/command_stream.h | 9 | ||||
-rw-r--r-- | chromeos/binder/constants.h | 6 | ||||
-rw-r--r-- | chromeos/binder/driver.h | 3 | ||||
-rw-r--r-- | chromeos/binder/status.h | 6 | ||||
-rw-r--r-- | chromeos/binder/transaction_data.h | 6 | ||||
-rw-r--r-- | chromeos/binder/transaction_data_from_driver.h | 11 | ||||
-rw-r--r-- | chromeos/binder/util.h | 9 | ||||
-rw-r--r-- | chromeos/binder/writable_transaction_data.h | 9 |
10 files changed, 39 insertions, 33 deletions
diff --git a/chromeos/binder/buffer_reader.h b/chromeos/binder/buffer_reader.h index c42738e..0de70c1 100644 --- a/chromeos/binder/buffer_reader.h +++ b/chromeos/binder/buffer_reader.h @@ -2,15 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_BUFFER_READER_H_ -#define BINDER_BUFFER_READER_H_ +#ifndef CHROMEOS_BINDER_BUFFER_READER_H_ +#define CHROMEOS_BINDER_BUFFER_READER_H_ #include "base/macros.h" +#include "chromeos/chromeos_export.h" namespace binder { // BufferReader reads data from the given buffer. -class BufferReader { +class CHROMEOS_EXPORT BufferReader { public: BufferReader(const char* data, size_t size); ~BufferReader(); @@ -39,4 +40,4 @@ class BufferReader { } // namespace binder -#endif // BINDER_BUFFER_READER_H_ +#endif // CHROMEOS_BINDER_BUFFER_READER_H_ diff --git a/chromeos/binder/command_broker.h b/chromeos/binder/command_broker.h index 96a3893..86e0324 100644 --- a/chromeos/binder/command_broker.h +++ b/chromeos/binder/command_broker.h @@ -12,6 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "chromeos/binder/command_stream.h" +#include "chromeos/chromeos_export.h" namespace binder { @@ -22,7 +23,8 @@ class TransactionData; // dispatches incoming commands to appropriate objects. // Usually this class lives as long as the corresponding thread. // TODO(hashimoto): Add code to handle incoming commands (e.g. transactions). -class CommandBroker : public CommandStream::IncomingCommandHandler { +class CHROMEOS_EXPORT CommandBroker + : public CommandStream::IncomingCommandHandler { public: explicit CommandBroker(Driver* driver); ~CommandBroker() override; diff --git a/chromeos/binder/command_stream.h b/chromeos/binder/command_stream.h index 32ca83e..3ce431a 100644 --- a/chromeos/binder/command_stream.h +++ b/chromeos/binder/command_stream.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_COMMAND_STREAM_H_ -#define BINDER_COMMAND_STREAM_H_ +#ifndef CHROMEOS_BINDER_COMMAND_STREAM_H_ +#define CHROMEOS_BINDER_COMMAND_STREAM_H_ #include <vector> @@ -12,6 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" +#include "chromeos/chromeos_export.h" namespace binder { @@ -21,7 +22,7 @@ class TransactionData; // Stream of incoming (binder driver to user process) BR_* commands and outgoing // (user process to binder driver) BC_* commands. -class CommandStream { +class CHROMEOS_EXPORT CommandStream { public: // IncomingCommandHandler is responsible to handle incoming commands. class IncomingCommandHandler { @@ -87,4 +88,4 @@ class CommandStream { } // namespace binder -#endif // BINDER_COMMAND_STREAM_H_ +#endif // CHROMEOS_BINDER_COMMAND_STREAM_H_ diff --git a/chromeos/binder/constants.h b/chromeos/binder/constants.h index 336033a..d039b18 100644 --- a/chromeos/binder/constants.h +++ b/chromeos/binder/constants.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_CONSTANTS_H_ -#define BINDER_CONSTANTS_H_ +#ifndef CHROMEOS_BINDER_CONSTANTS_H_ +#define CHROMEOS_BINDER_CONSTANTS_H_ #define BINDER_PACK_CHARS(c1, c2, c3, c4) \ (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4)) @@ -20,4 +20,4 @@ const uint32 kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G'); } // namespace binder -#endif // BINDER_CONSTANTS_H_ +#endif // CHROMEOS_BINDER_CONSTANTS_H_ diff --git a/chromeos/binder/driver.h b/chromeos/binder/driver.h index ce280f9..da7479e 100644 --- a/chromeos/binder/driver.h +++ b/chromeos/binder/driver.h @@ -7,13 +7,14 @@ #include "base/files/scoped_file.h" #include "base/macros.h" +#include "chromeos/chromeos_export.h" namespace binder { // Use this class to communicate with the binder driver provided by the kernel. // This class is stateless and it's safe to access this class from multiple // threads. -class Driver { +class CHROMEOS_EXPORT Driver { public: Driver(); ~Driver(); diff --git a/chromeos/binder/status.h b/chromeos/binder/status.h index 8646d23..0bcf4fa 100644 --- a/chromeos/binder/status.h +++ b/chromeos/binder/status.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_STATUS_H_ -#define BINDER_STATUS_H_ +#ifndef CHROMEOS_BINDER_STATUS_H_ +#define CHROMEOS_BINDER_STATUS_H_ #include <errno.h> @@ -39,4 +39,4 @@ enum class Status : int32 { } // namespace binder -#endif // BINDER_STATUS_H_ +#endif // CHROMEOS_BINDER_STATUS_H_ diff --git a/chromeos/binder/transaction_data.h b/chromeos/binder/transaction_data.h index 52a3569..c7602c0 100644 --- a/chromeos/binder/transaction_data.h +++ b/chromeos/binder/transaction_data.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_TRANSACTION_DATA_H_ -#define BINDER_TRANSACTION_DATA_H_ +#ifndef CHROMEOS_BINDER_TRANSACTION_DATA_H_ +#define CHROMEOS_BINDER_TRANSACTION_DATA_H_ #include "base/basictypes.h" #include "chromeos/binder/status.h" @@ -52,4 +52,4 @@ class TransactionData { } // namespace binder -#endif // BINDER_TRANSACTION_DATA_H_ +#endif // CHROMEOS_BINDER_TRANSACTION_DATA_H_ diff --git a/chromeos/binder/transaction_data_from_driver.h b/chromeos/binder/transaction_data_from_driver.h index ec10342..96aee9a 100644 --- a/chromeos/binder/transaction_data_from_driver.h +++ b/chromeos/binder/transaction_data_from_driver.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ -#define BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ +#ifndef CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ +#define CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ #include <unistd.h> #include <linux/android/binder.h> @@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "chromeos/binder/transaction_data.h" +#include "chromeos/chromeos_export.h" namespace base { class SingleThreadTaskRunner; @@ -19,11 +20,9 @@ class SingleThreadTaskRunner; namespace binder { -class CommandStream; - // TransactionData passed by the driver, whose data needs to be freed with // BC_FREE_BUFFER command. -class TransactionDataFromDriver : public TransactionData { +class CHROMEOS_EXPORT TransactionDataFromDriver : public TransactionData { public: typedef base::Callback<void(const void* ptr)> BufferDeleter; explicit TransactionDataFromDriver(const BufferDeleter& buffer_deleter); @@ -55,4 +54,4 @@ class TransactionDataFromDriver : public TransactionData { } // namespace binder -#endif // BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ +#endif // CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ diff --git a/chromeos/binder/util.h b/chromeos/binder/util.h index 6a2b29a..6801d24 100644 --- a/chromeos/binder/util.h +++ b/chromeos/binder/util.h @@ -2,17 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_UTIL_H_ -#define BINDER_UTIL_H_ +#ifndef CHROMEOS_BINDER_UTIL_H_ +#define CHROMEOS_BINDER_UTIL_H_ #include "base/basictypes.h" +#include "chromeos/chromeos_export.h" namespace binder { // Returns the string representation of the given binder command or "UNKNOWN" // if command is unknown, never returns null. -const char* CommandToString(uint32 command); +CHROMEOS_EXPORT const char* CommandToString(uint32 command); } // namespace binder -#endif // BINDER_UTIL_H_ +#endif // CHROMEOS_BINDER_UTIL_H_ diff --git a/chromeos/binder/writable_transaction_data.h b/chromeos/binder/writable_transaction_data.h index 77d0193..f32eff8 100644 --- a/chromeos/binder/writable_transaction_data.h +++ b/chromeos/binder/writable_transaction_data.h @@ -2,21 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BINDER_WRITABLE_TRANSACTION_DATA_H_ -#define BINDER_WRITABLE_TRANSACTION_DATA_H_ +#ifndef CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_ +#define CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_ #include <vector> #include "base/basictypes.h" #include "base/macros.h" #include "chromeos/binder/transaction_data.h" +#include "chromeos/chromeos_export.h" namespace binder { // Use this class to construct TransactionData (as parameters and replies) to // transact with remote objects. // GetSenderPID() and GetSenderEUID() return 0. -class WritableTransactionData : public TransactionData { +class CHROMEOS_EXPORT WritableTransactionData : public TransactionData { public: WritableTransactionData(); ~WritableTransactionData() override; @@ -76,4 +77,4 @@ class WritableTransactionData : public TransactionData { } // namespace binder -#endif // BINDER_WRITABLE_TRANSACTION_DATA_H_ +#endif // CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_ |