diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-02 17:54:14 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-02 17:54:14 +0000 |
commit | 68a008e82da08b0bf7d421049f0a292b99b88048 (patch) | |
tree | c8877946ba313e24f2de3903f48994c0d1d29d70 /base | |
parent | 4d223f42c722674ae0a5f56cf9ac277fa9f52b9c (diff) | |
download | chromium_src-68a008e82da08b0bf7d421049f0a292b99b88048.zip chromium_src-68a008e82da08b0bf7d421049f0a292b99b88048.tar.gz chromium_src-68a008e82da08b0bf7d421049f0a292b99b88048.tar.bz2 |
linux: components build
Reapply r83630, r83629, r83583, and fix the one compile error.
TBR=rvargas
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/debug/trace_event.h | 2 | ||||
-rw-r--r-- | base/environment.h | 2 | ||||
-rw-r--r-- | base/file_util.h | 6 | ||||
-rw-r--r-- | base/global_descriptors_posix.h | 2 | ||||
-rw-r--r-- | base/linux_util.h | 6 | ||||
-rw-r--r-- | base/mime_util.h | 13 | ||||
-rw-r--r-- | base/process_util.h | 6 | ||||
-rw-r--r-- | base/rand_util_c.h | 6 | ||||
-rw-r--r-- | base/safe_strerror_posix.h | 8 |
9 files changed, 30 insertions, 21 deletions
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h index c3405fe..3b4afc5 100644 --- a/base/debug/trace_event.h +++ b/base/debug/trace_event.h @@ -88,7 +88,7 @@ class ProcessMetrics; namespace debug { -class TraceLog { +class BASE_API TraceLog { public: enum EventType { EVENT_BEGIN, diff --git a/base/environment.h b/base/environment.h index cf71724..9d2a662 100644 --- a/base/environment.h +++ b/base/environment.h @@ -16,7 +16,7 @@ namespace base { namespace env_vars { #if defined(OS_POSIX) -extern const char kHome[]; +BASE_API extern const char kHome[]; #endif } // namespace env_vars diff --git a/base/file_util.h b/base/file_util.h index a187fee..28c96e9 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -343,7 +343,7 @@ BASE_API bool SetLastModifiedTime(const FilePath& path, #if defined(OS_POSIX) // Store inode number of |path| in |inode|. Return true on success. -bool GetInode(const FilePath& path, ino_t* inode); +BASE_API bool GetInode(const FilePath& path, ino_t* inode); #endif // Wrapper for fopen-like calls. Returns non-NULL FILE* on success. @@ -365,7 +365,7 @@ BASE_API int ReadFile(const FilePath& filename, char* data, int size); BASE_API int WriteFile(const FilePath& filename, const char* data, int size); #if defined(OS_POSIX) // Append the data to |fd|. Does not close |fd| when done. -int WriteFileDescriptor(const int fd, const char* data, int size); +BASE_API int WriteFileDescriptor(const int fd, const char* data, int size); #endif // Gets the current working directory for the process. @@ -648,7 +648,7 @@ enum FileSystemType { // Attempts determine the FileSystemType for |path|. // Returns false if |path| doesn't exist. -bool GetFileSystemType(const FilePath& path, FileSystemType* type); +BASE_API bool GetFileSystemType(const FilePath& path, FileSystemType* type); #endif } // namespace file_util diff --git a/base/global_descriptors_posix.h b/base/global_descriptors_posix.h index d635cff..d4650e5 100644 --- a/base/global_descriptors_posix.h +++ b/base/global_descriptors_posix.h @@ -34,7 +34,7 @@ namespace base { // It maps from an abstract key to a descriptor. If independent modules each // need to define keys, then values should be chosen randomly so as not to // collide. -class GlobalDescriptors { +class BASE_API GlobalDescriptors { public: typedef uint32_t Key; typedef std::vector<std::pair<Key, int> > Mapping; diff --git a/base/linux_util.h b/base/linux_util.h index c1135ce..0e079d7 100644 --- a/base/linux_util.h +++ b/base/linux_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -11,6 +11,8 @@ #include <string> +#include "base/base_api.h" + namespace base { static const char kFindInodeSwitch[] = "--find-inode"; @@ -26,7 +28,7 @@ std::string GetLinuxDistro(); void SetLinuxDistro(const std::string& distro); // Return the inode number for the UNIX domain socket |fd|. -bool FileDescriptorGetInode(ino_t* inode_out, int fd); +BASE_API bool FileDescriptorGetInode(ino_t* inode_out, int fd); // Find the process which holds the given socket, named by inode number. If // multiple processes hold the socket, this function returns false. diff --git a/base/mime_util.h b/base/mime_util.h index 6212b31..0e0a242 100644 --- a/base/mime_util.h +++ b/base/mime_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,6 +8,9 @@ #include <string> +#include "base/base_api.h" +#include "build/build_config.h" + class FilePath; namespace mime_util { @@ -16,23 +19,23 @@ namespace mime_util { // have to exist. Please note because it doesn't touch the disk, this does not // work for directories. // If the mime type is unknown, this will return application/octet-stream. -std::string GetFileMimeType(const FilePath& filepath); +BASE_API std::string GetFileMimeType(const FilePath& filepath); // Get the mime type for a byte vector. -std::string GetDataMimeType(const std::string& data); +BASE_API std::string GetDataMimeType(const std::string& data); #if defined(TOOLKIT_GTK) // This detects the current GTK theme by calling gtk_settings_get_default(). // It should only be executed on the UI thread and must be called before // GetMimeIcon(). -void DetectGtkTheme(); +BASE_API void DetectGtkTheme(); #endif // Gets the file name for an icon given the mime type and icon pixel size. // Where an icon is a square image of |size| x |size|. // This will try to find the closest matching icon. If that's not available, // then a generic icon, and finally an empty FilePath if all else fails. -FilePath GetMimeIcon(const std::string& mime_type, size_t size); +BASE_API FilePath GetMimeIcon(const std::string& mime_type, size_t size); } // namespace mime_util diff --git a/base/process_util.h b/base/process_util.h index bb8f30e..5810ce3 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -165,7 +165,7 @@ BASE_API ProcessId GetProcId(ProcessHandle process); #if defined(OS_LINUX) // Returns the path to the executable of the given process. -FilePath GetProcessExecutablePath(ProcessHandle process); +BASE_API FilePath GetProcessExecutablePath(ProcessHandle process); // Parse the data found in /proc/<pid>/stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. @@ -177,7 +177,7 @@ static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score"; // This adjusts /proc/process/oom_adj so the Linux OOM killer will prefer // certain process types over others. The range for the adjustment is // [-17,15], with [0,15] being user accessible. -bool AdjustOOMScore(ProcessId process, int score); +BASE_API bool AdjustOOMScore(ProcessId process, int score); #endif #if defined(OS_POSIX) @@ -187,7 +187,7 @@ BASE_API ProcessId GetParentProcessId(ProcessHandle process); // Close all file descriptors, except those which are a destination in the // given multimap. Only call this function in a child process where you know // that there aren't any other threads. -void CloseSuperfluousFds(const InjectiveMultimap& saved_map); +BASE_API void CloseSuperfluousFds(const InjectiveMultimap& saved_map); #endif #if defined(OS_WIN) diff --git a/base/rand_util_c.h b/base/rand_util_c.h index 63cf813..8320ba6 100644 --- a/base/rand_util_c.h +++ b/base/rand_util_c.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -6,6 +6,8 @@ #define BASE_RAND_UTIL_C_H_ #pragma once +#include "base/base_api.h" + #ifdef __cplusplus extern "C" { #endif @@ -15,7 +17,7 @@ extern "C" { // Returns an FD for /dev/urandom, possibly pre-opened before sandboxing // was switched on. This is a C function so that Native Client can use it. -int GetUrandomFD(void); +BASE_API int GetUrandomFD(void); #ifdef __cplusplus } diff --git a/base/safe_strerror_posix.h b/base/safe_strerror_posix.h index 03c18c8..e72c836 100644 --- a/base/safe_strerror_posix.h +++ b/base/safe_strerror_posix.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,6 +8,8 @@ #include <string> +#include "base/base_api.h" + // BEFORE using anything from this file, first look at PLOG and friends in // logging.h and use them instead if applicable. // @@ -24,7 +26,7 @@ // result is always null-terminated. The value of errno is never changed. // // Use this instead of strerror_r(). -void safe_strerror_r(int err, char *buf, size_t len); +BASE_API void safe_strerror_r(int err, char *buf, size_t len); // Calls safe_strerror_r with a buffer of suitable size and returns the result // in a C++ string. @@ -32,6 +34,6 @@ void safe_strerror_r(int err, char *buf, size_t len); // Use this instead of strerror(). Note though that safe_strerror_r will be // more robust in the case of heap corruption errors, since it doesn't need to // allocate a string. -std::string safe_strerror(int err); +BASE_API std::string safe_strerror(int err); #endif // BASE_SAFE_STRERROR_POSIX_H_ |