summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 22:22:10 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 22:22:10 +0000
commit23bb71fb2a8d32adb4f5d9baf36a6b17c2111fa9 (patch)
tree39abb0de36acc80ae452d45d57504242d980536e
parent25b63dbaa7974ee2f62928790139611adfae1bad (diff)
downloadchromium_src-23bb71fb2a8d32adb4f5d9baf36a6b17c2111fa9.zip
chromium_src-23bb71fb2a8d32adb4f5d9baf36a6b17c2111fa9.tar.gz
chromium_src-23bb71fb2a8d32adb4f5d9baf36a6b17c2111fa9.tar.bz2
Base: More adjustments to BASE_API and project dependencies to
use base.dll from chrome. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6877053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82564 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base.gyp8
-rw-r--r--base/base.gypi1
-rw-r--r--base/debug/profiler.h10
-rw-r--r--base/files/file_path_watcher.h3
-rw-r--r--base/logging.h2
-rw-r--r--base/message_loop.h2
-rw-r--r--base/metrics/nacl_histogram.h6
-rw-r--r--base/string_util.h21
-rw-r--r--base/tracked_objects.h2
-rw-r--r--base/utf_offset_string_conversions.h4
-rw-r--r--base/utf_string_conversion_utils.h6
-rw-r--r--chrome/app/policy/cloud_policy_codegen.gyp1
-rw-r--r--chrome/browser/policy/configuration_policy_loader_win.cc3
-rw-r--r--chrome/chrome.gyp1
-rw-r--r--chrome/chrome_common.gypi3
-rw-r--r--chrome/chrome_exe.gypi3
-rw-r--r--chrome/chrome_installer_util.gypi4
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--chrome/common/bzip2_error_handler.cc (renamed from base/bzip2_error_handler.cc)0
-rw-r--r--chrome/default_plugin/default_plugin.gyp3
-rw-r--r--chrome/installer/upgrade_test.gyp5
21 files changed, 59 insertions, 30 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 682eacf..85fc58f 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -55,7 +55,8 @@
},
{
# This is the subset of files from base that should not be used with a
- # dynamic library.
+ # dynamic library. Note that this library cannot depend on base because
+ # base depends on base_static.
'target_name': 'base_static',
'type': '<(library)',
'sources': [
@@ -221,6 +222,7 @@
'base_i18n',
'base_static',
'test_support_base',
+ 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
],
@@ -279,10 +281,14 @@
'type': '<(library)',
'dependencies': [
'base',
+ 'base_static',
'base_i18n',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
],
+ 'export_dependent_settings': [
+ 'base',
+ ],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies': [
diff --git a/base/base.gypi b/base/base.gypi
index 51a9643..5db404c 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -40,7 +40,6 @@
'bind_internal.h',
'bind_internal_win.h',
'bits.h',
- 'bzip2_error_handler.cc',
'callback.h',
'callback_internal.cc',
'callback_internal.h',
diff --git a/base/debug/profiler.h b/base/debug/profiler.h
index e3044d6..55c0c9f 100644
--- a/base/debug/profiler.h
+++ b/base/debug/profiler.h
@@ -8,6 +8,8 @@
#include <string>
+#include "base/base_api.h"
+
// The Profiler functions allow usage of the underlying sampling based
// profiler. If the application has not been built with the necessary
// flags (-DENABLE_PROFILING and not -DNO_TCMALLOC) then these functions
@@ -18,16 +20,16 @@ namespace debug {
// Start profiling with the supplied name.
// {pid} will be replaced by the process' pid and {count} will be replaced
// by the count of the profile run (starts at 1 with each process).
-void StartProfiling(const std::string& name);
+BASE_API void StartProfiling(const std::string& name);
// Stop profiling and write out data.
-void StopProfiling();
+BASE_API void StopProfiling();
// Force data to be written to file.
-void FlushProfiling();
+BASE_API void FlushProfiling();
// Returns true if process is being profiled.
-bool BeingProfiled();
+BASE_API bool BeingProfiled();
} // namespace debug
} // namespace base
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index 2cf95c6..ec41f53 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -8,6 +8,7 @@
#define BASE_FILES_FILE_PATH_WATCHER_H_
#pragma once
+#include "base/base_api.h"
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
@@ -25,7 +26,7 @@ namespace files {
// detect the creation and deletion of files in a watched directory, but will
// not detect modifications to those files. See file_path_watcher_mac.cc for
// details.
-class FilePathWatcher {
+class BASE_API FilePathWatcher {
public:
// Declares the callback client code implements to receive notifications. Note
// that implementations of this interface should not keep a reference to the
diff --git a/base/logging.h b/base/logging.h
index 0e78e1a..1c2a22f 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -794,7 +794,7 @@ inline void LogAtLevel(int const log_level, std::string const &msg) {
// This class is used to explicitly ignore values in the conditional
// logging macros. This avoids compiler warnings like "value computed
// is not used" and "statement has no effect".
-class BASE_API LogMessageVoidify {
+class LogMessageVoidify {
public:
LogMessageVoidify() { }
// This has to be an operator with a precedence lower than << but
diff --git a/base/message_loop.h b/base/message_loop.h
index b601d9e..a64196ce 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -377,7 +377,7 @@ class BASE_API MessageLoop : public base::MessagePump::Delegate {
#endif
};
- class AutoRunState : RunState {
+ class BASE_API AutoRunState : RunState {
public:
explicit AutoRunState(MessageLoop* loop);
~AutoRunState();
diff --git a/base/metrics/nacl_histogram.h b/base/metrics/nacl_histogram.h
index 479b571..6147047 100644
--- a/base/metrics/nacl_histogram.h
+++ b/base/metrics/nacl_histogram.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.
@@ -14,6 +14,8 @@
#define BASE_METRICS_NACL_HISTOGRAM_H_
#pragma once
+#include "base/base_api.h"
+
enum NaClHistogramValue {
FIRST_TAB_NACL_BASELINE, // First tab created - a baseline for NaCl starts.
NEW_TAB_NACL_BASELINE, // New tab created -- a baseline for NaCl starts.
@@ -23,7 +25,7 @@ enum NaClHistogramValue {
// To log histogram data about NaCl.Startups, call this macro with
// a NaClHistogramValue passed in as |histogram_value|
-void UmaNaclHistogramEnumeration(NaClHistogramValue histogram_value);
+BASE_API void UmaNaclHistogramEnumeration(NaClHistogramValue histogram_value);
#endif // BASE_METRICS_NACL_HISTOGRAM_H_
diff --git a/base/string_util.h b/base/string_util.h
index 81d31d3..9864137 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -36,29 +36,28 @@ namespace base {
// Compares the two strings s1 and s2 without regard to case using
// the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
// s2 > s1 according to a lexicographic comparison.
-BASE_API int strcasecmp(const char* s1, const char* s2);
+int strcasecmp(const char* s1, const char* s2);
// Compares up to count characters of s1 and s2 without regard to case using
// the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
// s2 > s1 according to a lexicographic comparison.
-BASE_API int strncasecmp(const char* s1, const char* s2, size_t count);
+int strncasecmp(const char* s1, const char* s2, size_t count);
// Same as strncmp but for char16 strings.
-BASE_API int strncmp16(const char16* s1, const char16* s2, size_t count);
+int strncmp16(const char16* s1, const char16* s2, size_t count);
// Wrapper for vsnprintf that always null-terminates and always returns the
// number of characters that would be in an untruncated formatted
// string, even when truncation occurs.
-BASE_API int vsnprintf(char* buffer, size_t size, const char* format,
- va_list arguments)
+int vsnprintf(char* buffer, size_t size, const char* format, va_list arguments)
PRINTF_FORMAT(3, 0);
// vswprintf always null-terminates, but when truncation occurs, it will either
// return -1 or the number of characters that would be in an untruncated
// formatted string. The actual return value depends on the underlying
// C library's vswprintf implementation.
-BASE_API int vswprintf(wchar_t* buffer, size_t size,
- const wchar_t* format, va_list arguments)
+int vswprintf(wchar_t* buffer, size_t size,
+ const wchar_t* format, va_list arguments)
WPRINTF_FORMAT(3, 0);
// Some of these implementations need to be inlined.
@@ -172,11 +171,11 @@ BASE_API const std::string& EmptyString();
BASE_API const std::wstring& EmptyWString();
BASE_API const string16& EmptyString16();
-extern const wchar_t kWhitespaceWide[];
-extern const char16 kWhitespaceUTF16[];
-extern const char kWhitespaceASCII[];
+BASE_API extern const wchar_t kWhitespaceWide[];
+BASE_API extern const char16 kWhitespaceUTF16[];
+BASE_API extern const char kWhitespaceASCII[];
-extern const char kUtf8ByteOrderMark[];
+BASE_API extern const char kUtf8ByteOrderMark[];
// Removes characters in remove_chars from anywhere in input. Returns true if
// any characters were removed.
diff --git a/base/tracked_objects.h b/base/tracked_objects.h
index 99b5ed2..561eaee 100644
--- a/base/tracked_objects.h
+++ b/base/tracked_objects.h
@@ -630,7 +630,7 @@ class BASE_API ThreadData {
// only allow the tracking system to be started up at most once, and shutdown
// at most once. See bug 31344 for an example.
-class AutoTracking {
+class BASE_API AutoTracking {
public:
AutoTracking() {
if (state_ != kNeverBeenRun)
diff --git a/base/utf_offset_string_conversions.h b/base/utf_offset_string_conversions.h
index 152eda3..76247a6 100644
--- a/base/utf_offset_string_conversions.h
+++ b/base/utf_offset_string_conversions.h
@@ -76,10 +76,10 @@ struct LimitOffset {
// AdjustOffset(adjustments). Each Adjustment gives the original |location|
// of the encoded section and the |old_length| and |new_length| of the section
// before and after decoding.
-struct AdjustOffset {
+struct BASE_API AdjustOffset {
// Helper structure which indicates where an encoded character occurred
// and how long that encoding was.
- struct Adjustment {
+ struct BASE_API Adjustment {
Adjustment(size_t location, size_t old_length, size_t new_length);
size_t location;
diff --git a/base/utf_string_conversion_utils.h b/base/utf_string_conversion_utils.h
index a34c9ae..baa7b5c 100644
--- a/base/utf_string_conversion_utils.h
+++ b/base/utf_string_conversion_utils.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,7 @@
// This should only be used by the various UTF string conversion files.
+#include "base/base_api.h"
#include "base/string16.h"
namespace base {
@@ -60,7 +61,8 @@ bool ReadUnicodeCharacter(const wchar_t* src,
// Appends a UTF-8 character to the given 8-bit string. Returns the number of
// bytes written.
-size_t WriteUnicodeCharacter(uint32 code_point, std::string* output);
+// TODO(brettw) Bug 79631: This function should not be exposed.
+BASE_API size_t WriteUnicodeCharacter(uint32 code_point, std::string* output);
// Appends the given code point as a UTF-16 character to the given 16-bit
// string. Returns the number of 16-bit values written.
diff --git a/chrome/app/policy/cloud_policy_codegen.gyp b/chrome/app/policy/cloud_policy_codegen.gyp
index 723d091..a65308c 100644
--- a/chrome/app/policy/cloud_policy_codegen.gyp
+++ b/chrome/app/policy/cloud_policy_codegen.gyp
@@ -164,6 +164,7 @@
'cloud_policy_code_generate',
'cloud_policy_proto_compile',
'cloud_policy_backend_header_compile',
+ '<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
],
},
diff --git a/chrome/browser/policy/configuration_policy_loader_win.cc b/chrome/browser/policy/configuration_policy_loader_win.cc
index 0a96e6b..87e6056 100644
--- a/chrome/browser/policy/configuration_policy_loader_win.cc
+++ b/chrome/browser/policy/configuration_policy_loader_win.cc
@@ -8,6 +8,9 @@
#include "content/browser/browser_thread.h"
+// userenv.dll is required for RegisterGPNotification().
+#pragma comment(lib, "userenv.lib")
+
namespace policy {
ConfigurationPolicyLoaderWin::ConfigurationPolicyLoaderWin(
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index e460f69..7093875 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -381,6 +381,7 @@
'dependencies': [
'chrome_resources',
'chrome_strings',
+ '../base/base.gyp:base',
'../net/net.gyp:http_server',
'theme_resources',
'theme_resources_standard',
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 7a83814..e9e47db 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -111,6 +111,7 @@
'../app/app.gyp:app_resources',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
+ '../base/base.gyp:base_static',
'../build/temp_gyp/googleurl.gyp:googleurl',
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
@@ -135,6 +136,7 @@
'common/automation_messages_internal.h',
'common/badge_util.cc',
'common/badge_util.h',
+ 'common/bzip2_error_handler.cc',
'common/chrome_content_client.cc',
'common/chrome_content_client.h',
'common/chrome_content_plugin_client.cc',
@@ -337,6 +339,7 @@
],
'export_dependent_settings': [
'../app/app.gyp:app_base',
+ '../base/base.gyp:base',
],
},
{
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index ca7ce1b..1cec8cc 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -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.
@@ -449,6 +449,7 @@
'dependencies': [
'installer_util',
'installer_util_strings',
+ '../base/base.gyp:base',
'../breakpad/breakpad.gyp:breakpad_handler',
'../breakpad/breakpad.gyp:breakpad_sender',
'../sandbox/sandbox.gyp:sandbox',
diff --git a/chrome/chrome_installer_util.gypi b/chrome/chrome_installer_util.gypi
index 5d44032..90eae05 100644
--- a/chrome/chrome_installer_util.gypi
+++ b/chrome/chrome_installer_util.gypi
@@ -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.
@@ -97,6 +97,8 @@
'chrome_resources',
'chrome_strings',
'../content/content.gyp:content_common',
+ '<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/courgette/courgette.gyp:courgette_lib',
'<(DEPTH)/third_party/bspatch/bspatch.gyp:bspatch',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 3134901..fb54c6d 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -45,6 +45,7 @@
'export_dependent_settings': [
'renderer',
'app/policy/cloud_policy_codegen.gyp:policy',
+ '../base/base.gyp:test_support_base',
],
'include_dirs': [
'..',
diff --git a/base/bzip2_error_handler.cc b/chrome/common/bzip2_error_handler.cc
index e66bcf3..e66bcf3 100644
--- a/base/bzip2_error_handler.cc
+++ b/chrome/common/bzip2_error_handler.cc
diff --git a/chrome/default_plugin/default_plugin.gyp b/chrome/default_plugin/default_plugin.gyp
index d468dee..247960f 100644
--- a/chrome/default_plugin/default_plugin.gyp
+++ b/chrome/default_plugin/default_plugin.gyp
@@ -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.
@@ -12,6 +12,7 @@
'type': '<(library)',
'dependencies': [
':default_plugin_resources',
+ '<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/net/net.gyp:net_resources',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
diff --git a/chrome/installer/upgrade_test.gyp b/chrome/installer/upgrade_test.gyp
index 5f155e0..3076268 100644
--- a/chrome/installer/upgrade_test.gyp
+++ b/chrome/installer/upgrade_test.gyp
@@ -1,3 +1,7 @@
+# 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.
+
{
'variables': {
'version_py': '../../chrome/tools/build/version.py',
@@ -17,6 +21,7 @@
'dependencies': [
'../chrome.gyp:common_constants',
'../chrome.gyp:installer_util',
+ '../../base/base.gyp:base',
],
'include_dirs': [
'../..',