diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 18:20:30 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 18:20:30 +0000 |
commit | fb895c694e2117c29b6afb699095f6e187a44da7 (patch) | |
tree | 04a0d1434a470f55f0e639a3e6f15c18416d80e2 /base | |
parent | 8ecb6aa0a92d5426c2c98c23e0e3f3c4f06972c5 (diff) | |
download | chromium_src-fb895c694e2117c29b6afb699095f6e187a44da7.zip chromium_src-fb895c694e2117c29b6afb699095f6e187a44da7.tar.gz chromium_src-fb895c694e2117c29b6afb699095f6e187a44da7.tar.bz2 |
Move more ICU-dependent stuff from base into base/i18n. Some test stuff also
depended on this, so to make the DEPS work out, I made a new base/test
directory where I moved the testing-related files into a new directory
base/test.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/266038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/DEPS | 5 | ||||
-rw-r--r-- | base/base.gyp | 34 | ||||
-rw-r--r-- | base/i18n/icu_util.cc (renamed from base/icu_util.cc) | 6 | ||||
-rw-r--r-- | base/i18n/icu_util.h (renamed from base/icu_util.h) | 8 | ||||
-rw-r--r-- | base/i18n/time_formatting.cc (renamed from base/time_format.cc) | 4 | ||||
-rw-r--r-- | base/i18n/time_formatting.h (renamed from base/time_format.h) | 8 | ||||
-rw-r--r-- | base/i18n/word_iterator.cc (renamed from base/word_iterator.cc) | 4 | ||||
-rw-r--r-- | base/i18n/word_iterator.h (renamed from base/word_iterator.h) | 10 | ||||
-rw-r--r-- | base/i18n/word_iterator_unittest.cc (renamed from base/word_iterator_unittest.cc) | 4 | ||||
-rw-r--r-- | base/test/perf_test_suite.h (renamed from base/perf_test_suite.h) | 4 | ||||
-rw-r--r-- | base/test/run_all_perftests.cc (renamed from base/run_all_perftests.cc) | 2 | ||||
-rw-r--r-- | base/test/run_all_unittests.cc (renamed from base/run_all_unittests.cc) | 4 | ||||
-rw-r--r-- | base/test/test_file_util.h (renamed from base/test_file_util.h) | 0 | ||||
-rw-r--r-- | base/test/test_file_util_linux.cc (renamed from base/test_file_util_linux.cc) | 2 | ||||
-rw-r--r-- | base/test/test_file_util_mac.cc (renamed from base/test_file_util_mac.cc) | 8 | ||||
-rw-r--r-- | base/test/test_file_util_posix.cc (renamed from base/test_file_util_posix.cc) | 2 | ||||
-rw-r--r-- | base/test/test_file_util_win.cc (renamed from base/test_file_util_win.cc) | 2 | ||||
-rw-r--r-- | base/test/test_suite.h (renamed from base/test_suite.h) | 4 |
18 files changed, 56 insertions, 55 deletions
@@ -1,6 +1,7 @@ include_rules = [ - "+third_party/zlib", "+third_party/libevent", - "+third_party/libjpeg", "+third_party/dmg_fp", + + # Testing stuff shouldn't be used by the general base code. + "-base/test", ] diff --git a/base/base.gyp b/base/base.gyp index 570e9f0..09dca2b 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -144,12 +144,16 @@ 'i18n/file_util_icu.h', 'i18n/icu_string_conversions.cc', 'i18n/icu_string_conversions.h', + 'i18n/icu_util.cc', + 'i18n/icu_util.h', 'i18n/number_formatting.cc', 'i18n/number_formatting.h', + 'i18n/time_formatting.cc', + 'i18n/time_formatting.h', + 'i18n/word_iterator.cc', + 'i18n/word_iterator.h', 'iat_patch.cc', 'iat_patch.h', - 'icu_util.cc', - 'icu_util.h', 'id_map.h', 'image_util.cc', 'image_util.h', @@ -314,8 +318,6 @@ 'thread_local_win.cc', 'time.cc', 'time.h', - 'time_format.cc', - 'time_format.h', 'time_mac.cc', 'time_posix.cc', 'time_win.cc', @@ -349,8 +351,6 @@ 'windows_message_list.h', 'wmi_util.cc', 'wmi_util.h', - 'word_iterator.cc', - 'word_iterator.h', 'worker_pool.h', 'worker_pool_linux.cc', 'worker_pool_linux.h', @@ -560,8 +560,8 @@ 'sources': [ # Infrastructure files. 'multiprocess_test.h', - 'run_all_unittests.cc', - 'test_suite.h', + 'test/run_all_unittests.cc', + 'test/test_suite.h', # Tests. 'at_exit_unittest.cc', @@ -585,6 +585,7 @@ 'hmac_unittest.cc', 'id_map_unittest.cc', 'i18n/file_util_icu_unittest.cc', + 'i18n/word_iterator_unittest.cc', 'json_reader_unittest.cc', 'json_writer_unittest.cc', 'lazy_instance_unittest.cc', @@ -639,7 +640,6 @@ 'weak_ptr_unittest.cc', 'win_util_unittest.cc', 'wmi_util_unittest.cc', - 'word_iterator_unittest.cc', 'worker_pool_unittest.cc', ], 'include_dirs': [ @@ -707,11 +707,11 @@ 'base', ], 'sources': [ - 'test_file_util.h', - 'test_file_util_linux.cc', - 'test_file_util_mac.cc', - 'test_file_util_posix.cc', - 'test_file_util_win.cc', + 'test/test_file_util.h', + 'test/test_file_util_linux.cc', + 'test/test_file_util_mac.cc', + 'test/test_file_util_posix.cc', + 'test/test_file_util_win.cc', ], 'conditions': [ [ 'OS == "linux" or OS == "freebsd"', { @@ -745,7 +745,7 @@ ], 'sources': [ 'perftimer.cc', - 'run_all_perftests.cc', + 'test/run_all_perftests.cc', ], 'direct_dependent_settings': { 'defines': [ @@ -756,8 +756,8 @@ ['OS == "linux" or OS == "freebsd"', { 'dependencies': [ # Needed to handle the #include chain: - # base/perf_test_suite.h - # base/test_suite.h + # base/test/perf_test_suite.h + # base/test/test_suite.h # gtk/gtk.h '../build/linux/system.gyp:gtk', ], diff --git a/base/icu_util.cc b/base/i18n/icu_util.cc index b885cd1..6239a01 100644 --- a/base/icu_util.cc +++ b/base/i18n/icu_util.cc @@ -1,7 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. +#include "base/i18n/icu_util.h" + #include "build/build_config.h" #if defined(OS_WIN) @@ -10,8 +12,6 @@ #include <string> -#include "base/icu_util.h" - #include "base/file_path.h" #include "base/file_util.h" #include "base/logging.h" diff --git a/base/icu_util.h b/base/i18n/icu_util.h index 5829b70..56eaa37 100644 --- a/base/icu_util.h +++ b/base/i18n/icu_util.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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 BASE_ICU_UTIL_H__ -#define BASE_ICU_UTIL_H__ +#ifndef BASE_I18N_ICU_UTIL_H_ +#define BASE_I18N_ICU_UTIL_H_ namespace icu_util { @@ -13,4 +13,4 @@ bool Initialize(); } // namespace icu_util -#endif // BASE_ICU_UTIL_H__ +#endif // BASE_I18N_ICU_UTIL_H_ diff --git a/base/time_format.cc b/base/i18n/time_formatting.cc index 80c4235..f031cf7 100644 --- a/base/time_format.cc +++ b/base/i18n/time_formatting.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. -#include "base/time_format.h" +#include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/scoped_ptr.h" diff --git a/base/time_format.h b/base/i18n/time_formatting.h index b51c768..dd623af 100644 --- a/base/time_format.h +++ b/base/i18n/time_formatting.h @@ -1,12 +1,12 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. // Basic time formatting methods. These methods use the current locale // formatting for displaying the time. -#ifndef BASE_TIME_FORMAT_H_ -#define BASE_TIME_FORMAT_H_ +#ifndef BASE_I18N_TIME_FORMATTING_H_ +#define BASE_I18N_TIME_FORMATTING_H_ #include <string> @@ -37,4 +37,4 @@ std::wstring TimeFormatFriendlyDate(const Time& time); } // namespace base -#endif // BASE_TIME_FORMAT_H_ +#endif // BASE_I18N_TIME_FORMATTING_H_ diff --git a/base/word_iterator.cc b/base/i18n/word_iterator.cc index edbc4d3..45a06b9 100644 --- a/base/word_iterator.cc +++ b/base/i18n/word_iterator.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. -#include "base/word_iterator.h" +#include "base/i18n/word_iterator.h" #include "base/logging.h" #include "unicode/ubrk.h" diff --git a/base/word_iterator.h b/base/i18n/word_iterator.h index 3e53c20..c9648ca 100644 --- a/base/word_iterator.h +++ b/base/i18n/word_iterator.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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 BASE_WORD_ITERATOR_H__ -#define BASE_WORD_ITERATOR_H__ +#ifndef BASE_I18N_WORD_ITERATOR_H_ +#define BASE_I18N_WORD_ITERATOR_H_ #include <string> #include <vector> @@ -81,7 +81,7 @@ class WordIterator { // Previous and current iterator positions. size_t prev_, pos_; - DISALLOW_EVIL_CONSTRUCTORS(WordIterator); + DISALLOW_COPY_AND_ASSIGN(WordIterator); }; -#endif // BASE_WORD_ITERATOR_H__ +#endif // BASE_I18N_WORD_ITERATOR_H__ diff --git a/base/word_iterator_unittest.cc b/base/i18n/word_iterator_unittest.cc index 4f85a46..0d28370 100644 --- a/base/word_iterator_unittest.cc +++ b/base/i18n/word_iterator_unittest.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. -#include "base/word_iterator.h" +#include "base/i18n/word_iterator.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/perf_test_suite.h b/base/test/perf_test_suite.h index ea6846a..7393544 100644 --- a/base/perf_test_suite.h +++ b/base/test/perf_test_suite.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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,7 +11,7 @@ #include "base/perftimer.h" #include "base/process_util.h" #include "base/string_util.h" -#include "base/test_suite.h" +#include "base/test/test_suite.h" class PerfTestSuite : public TestSuite { public: diff --git a/base/run_all_perftests.cc b/base/test/run_all_perftests.cc index 84ed48f..6d0a8ee 100644 --- a/base/run_all_perftests.cc +++ b/base/test/run_all_perftests.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/perf_test_suite.h" +#include "base/test/perf_test_suite.h" int main(int argc, char** argv) { return PerfTestSuite(argc, argv).Run(); diff --git a/base/run_all_unittests.cc b/base/test/run_all_unittests.cc index d9f6b58..841b353 100644 --- a/base/run_all_unittests.cc +++ b/base/test/run_all_unittests.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. -#include "base/test_suite.h" +#include "base/test/test_suite.h" int main(int argc, char** argv) { return TestSuite(argc, argv).Run(); diff --git a/base/test_file_util.h b/base/test/test_file_util.h index 3d2764e..3d2764e 100644 --- a/base/test_file_util.h +++ b/base/test/test_file_util.h diff --git a/base/test_file_util_linux.cc b/base/test/test_file_util_linux.cc index c1b3768..c2911ce 100644 --- a/base/test_file_util_linux.cc +++ b/base/test/test_file_util_linux.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/test_file_util.h" +#include "base/test/test_file_util.h" #include <fcntl.h> #include <sys/stat.h> diff --git a/base/test_file_util_mac.cc b/base/test/test_file_util_mac.cc index 05e57c4..316b5c3 100644 --- a/base/test_file_util_mac.cc +++ b/base/test/test_file_util_mac.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/test_file_util.h" +#include "base/test/test_file_util.h" #include <sys/mman.h> #include <errno.h> @@ -22,14 +22,14 @@ bool EvictFileFromSystemCache(const FilePath& file) { DLOG(WARNING) << "failed to memory map " << file.value(); return false; } - + if (msync(const_cast<uint8*>(mapped_file.data()), mapped_file.length(), MS_INVALIDATE) != 0) { - DLOG(WARNING) << "failed to invalidate memory map of " << file.value() + DLOG(WARNING) << "failed to invalidate memory map of " << file.value() << ", errno: " << errno; return false; } - + return true; } diff --git a/base/test_file_util_posix.cc b/base/test/test_file_util_posix.cc index 122dd04..096f3c6 100644 --- a/base/test_file_util_posix.cc +++ b/base/test/test_file_util_posix.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/test_file_util.h" +#include "base/test/test_file_util.h" #include <errno.h> #include <sys/types.h> diff --git a/base/test_file_util_win.cc b/base/test/test_file_util_win.cc index 600f30a..4ebea54 100644 --- a/base/test_file_util_win.cc +++ b/base/test/test_file_util_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/test_file_util.h" +#include "base/test/test_file_util.h" #include <windows.h> diff --git a/base/test_suite.h b/base/test/test_suite.h index 4102252..1203904 100644 --- a/base/test_suite.h +++ b/base/test/test_suite.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. @@ -15,7 +15,7 @@ #include "base/debug_on_start.h" #include "base/debug_util.h" #include "base/file_path.h" -#include "base/icu_util.h" +#include "base/i18n/icu_util.h" #include "base/logging.h" #include "base/multiprocess_test.h" #include "base/scoped_nsautorelease_pool.h" |