diff --git a/base/base.gyp b/base/base.gyp index c1448d89623485..4102004d0dd4a2 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -437,6 +437,7 @@ 'file_version_info_unittest.cc', 'files/dir_reader_posix_unittest.cc', 'files/important_file_writer_unittest.cc', + 'files/scoped_temp_dir_unittest.cc', 'gmock_unittest.cc', 'guid_unittest.cc', 'hi_res_timer_manager_unittest.cc', @@ -504,7 +505,6 @@ 'rand_util_unittest.cc', 'scoped_native_library_unittest.cc', 'scoped_observer.h', - 'scoped_temp_dir_unittest.cc', 'sha1_unittest.cc', 'shared_memory_unittest.cc', 'string16_unittest.cc', diff --git a/base/base.gypi b/base/base.gypi index 6f2a53a8e63ecc..c73ade59e1cbec 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -153,6 +153,8 @@ 'files/file_path_watcher_win.cc', 'files/important_file_writer.h', 'files/important_file_writer.cc', + 'files/scoped_temp_dir.cc', + 'files/scoped_temp_dir.h', 'float_util.h', 'format_macros.h', 'gtest_prod_util.h', @@ -346,8 +348,6 @@ 'safe_strerror_posix.h', 'scoped_native_library.cc', 'scoped_native_library.h', - 'scoped_temp_dir.cc', - 'scoped_temp_dir.h', 'sequenced_task_runner.cc', 'sequenced_task_runner.h', 'sequenced_task_runner_helpers.h', @@ -593,7 +593,7 @@ 'process_util_posix.cc', 'rand_util_posix.cc', 'scoped_native_library.cc', - 'scoped_temp_dir.cc', + 'files/scoped_temp_dir.cc', 'shared_memory_posix.cc', 'sys_info_posix.cc', 'threading/sequenced_worker_pool.cc', diff --git a/base/file_util_proxy_unittest.cc b/base/file_util_proxy_unittest.cc index 42856c470314c8..ed5403798b3c16 100644 --- a/base/file_util_proxy_unittest.cc +++ b/base/file_util_proxy_unittest.cc @@ -7,11 +7,11 @@ #include #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/threading/thread.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 8bee6a8066b1d1..452ee82def457b 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -19,8 +19,8 @@ #include "base/base_paths.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_file_util.h" #include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" @@ -143,7 +143,7 @@ class FileUtilTest : public PlatformTest { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; // Collects all the results from the given file enumerator, and provides an diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc index 94439b117f6fdc..640582398c71d9 100644 --- a/base/files/file_path_watcher_browsertest.cc +++ b/base/files/file_path_watcher_browsertest.cc @@ -19,10 +19,10 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/stringprintf.h" #include "base/synchronization/waitable_event.h" diff --git a/base/files/important_file_writer_unittest.cc b/base/files/important_file_writer_unittest.cc index a284d38709ea79..3bd3016ab3accc 100644 --- a/base/files/important_file_writer_unittest.cc +++ b/base/files/important_file_writer_unittest.cc @@ -7,9 +7,9 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/threading/thread.h" #include "base/time.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/scoped_temp_dir.cc b/base/files/scoped_temp_dir.cc similarity index 95% rename from base/scoped_temp_dir.cc rename to base/files/scoped_temp_dir.cc index 9f4bcf40c6db07..509f808f6d8571 100644 --- a/base/scoped_temp_dir.cc +++ b/base/files/scoped_temp_dir.cc @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/file_util.h" #include "base/logging.h" +namespace base { + ScopedTempDir::ScopedTempDir() { } @@ -80,3 +82,5 @@ FilePath ScopedTempDir::Take() { bool ScopedTempDir::IsValid() const { return !path_.empty() && file_util::DirectoryExists(path_); } + +} // namespace base diff --git a/base/scoped_temp_dir.h b/base/files/scoped_temp_dir.h similarity index 92% rename from base/scoped_temp_dir.h rename to base/files/scoped_temp_dir.h index 94acefcb16b015..641e7ef7230893 100644 --- a/base/scoped_temp_dir.h +++ b/base/files/scoped_temp_dir.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 BASE_SCOPED_TEMP_DIR_H_ -#define BASE_SCOPED_TEMP_DIR_H_ +#ifndef BASE_FILES_SCOPED_TEMP_DIR_H_ +#define BASE_FILES_SCOPED_TEMP_DIR_H_ // An object representing a temporary / scratch directory that should be cleaned // up (recursively) when this object goes out of scope. Note that since @@ -18,6 +18,8 @@ #include "base/base_export.h" #include "base/file_path.h" +namespace base { + class BASE_EXPORT ScopedTempDir { public: // No directory is owned/created initially. @@ -55,4 +57,6 @@ class BASE_EXPORT ScopedTempDir { DISALLOW_COPY_AND_ASSIGN(ScopedTempDir); }; -#endif // BASE_SCOPED_TEMP_DIR_H_ +} // namespace base + +#endif // BASE_FILES_SCOPED_TEMP_DIR_H_ diff --git a/base/scoped_temp_dir_unittest.cc b/base/files/scoped_temp_dir_unittest.cc similarity index 97% rename from base/scoped_temp_dir_unittest.cc rename to base/files/scoped_temp_dir_unittest.cc index eddea833e533ef..8497ac631dd2c7 100644 --- a/base/scoped_temp_dir_unittest.cc +++ b/base/files/scoped_temp_dir_unittest.cc @@ -5,10 +5,12 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" +namespace base { + TEST(ScopedTempDir, FullPath) { FilePath test_path; file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_temp_dir"), @@ -111,3 +113,5 @@ TEST(ScopedTempDir, LockedTempDir) { EXPECT_TRUE(dir.Delete()); } #endif // defined(OS_WIN) + +} // namespace base diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc index 89e3e4d0fcc0f1..dc103dd56512bf 100644 --- a/base/json/json_value_serializer_unittest.cc +++ b/base/json/json_value_serializer_unittest.cc @@ -5,11 +5,11 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/json/json_reader.h" #include "base/json/json_string_value_serializer.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/values.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm index 2984fee92fa703..d69e077ae58a6e 100644 --- a/base/mac/mac_util_unittest.mm +++ b/base/mac/mac_util_unittest.mm @@ -8,10 +8,10 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/mac/foundation_util.h" #include "base/mac/scoped_cftyperef.h" #include "base/memory/scoped_nsobject.h" -#include "base/scoped_temp_dir.h" #include "base/sys_info.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc index 5b282c69570e25..0b96c123e97abb 100644 --- a/base/path_service_unittest.cc +++ b/base/path_service_unittest.cc @@ -5,13 +5,13 @@ #include "base/path_service.h" #include "base/basictypes.h" -#include "base/file_util.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/string_util.h" #include "build/build_config.h" -#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest-spi.h" +#include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" #if defined(OS_WIN) @@ -139,7 +139,7 @@ TEST_F(PathServiceTest, Get) { // are supposed to do. TEST_F(PathServiceTest, Override) { int my_special_key = 666; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath fake_cache_dir(temp_dir.path().AppendASCII("cache")); // PathService::Override should always create the path provided if it doesn't @@ -162,7 +162,7 @@ TEST_F(PathServiceTest, Override) { // Check if multiple overrides can co-exist. TEST_F(PathServiceTest, OverrideMultiple) { int my_special_key = 666; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath fake_cache_dir1(temp_dir.path().AppendASCII("1")); EXPECT_TRUE(PathService::Override(my_special_key, fake_cache_dir1)); @@ -192,7 +192,7 @@ TEST_F(PathServiceTest, RemoveOverride) { EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &original_user_data_dir)); EXPECT_FALSE(PathService::RemoveOverride(base::DIR_TEMP)); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); EXPECT_TRUE(PathService::Override(base::DIR_TEMP, temp_dir.path())); FilePath new_user_data_dir; diff --git a/base/platform_file_unittest.cc b/base/platform_file_unittest.cc index 671deb03ce6569..3b07c9857e60be 100644 --- a/base/platform_file_unittest.cc +++ b/base/platform_file_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ int WriteFully(base::PlatformFile file, int64 offset, } // namespace TEST(PlatformFile, CreatePlatformFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.path().AppendASCII("create_file_1"); @@ -95,7 +95,7 @@ TEST(PlatformFile, CreatePlatformFile) { } TEST(PlatformFile, DeleteOpenFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.path().AppendASCII("create_file_1"); @@ -131,7 +131,7 @@ TEST(PlatformFile, DeleteOpenFile) { } TEST(PlatformFile, ReadWritePlatformFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.path().AppendASCII("read_write_file"); base::PlatformFile file = base::CreatePlatformFile( @@ -210,7 +210,7 @@ TEST(PlatformFile, ReadWritePlatformFile) { } TEST(PlatformFile, TruncatePlatformFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.path().AppendASCII("truncate_file"); base::PlatformFile file = base::CreatePlatformFile( @@ -261,7 +261,7 @@ TEST(PlatformFile, TruncatePlatformFile) { // Flakily fails: http://crbug.com/86494 TEST(PlatformFile, DISABLED_TouchGetInfoPlatformFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); base::PlatformFile file = base::CreatePlatformFile( temp_dir.path().AppendASCII("touch_get_info_file"), diff --git a/base/prefs/json_pref_store_unittest.cc b/base/prefs/json_pref_store_unittest.cc index 5258660fc155b1..c596a6b88f5996 100644 --- a/base/prefs/json_pref_store_unittest.cc +++ b/base/prefs/json_pref_store_unittest.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/prefs/json_pref_store.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/threading/sequenced_worker_pool.h" @@ -45,7 +45,7 @@ class JsonPrefStoreTest : public testing::Test { } // The path to temporary directory used to contain the test operations. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // The path to the directory where the test data is stored. FilePath data_dir_; // A message loop that we can use as the file thread message loop. diff --git a/base/test/scoped_path_override.h b/base/test/scoped_path_override.h index cf5c8108e76a39..3ac441cf60709b 100644 --- a/base/test/scoped_path_override.h +++ b/base/test/scoped_path_override.h @@ -6,7 +6,7 @@ #define BASE_TEST_SCOPED_PATH_OVERRIDE_H_ #include "base/basictypes.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" class FilePath; diff --git a/base/win/event_trace_consumer_unittest.cc b/base/win/event_trace_consumer_unittest.cc index 327e1c7c5b8935..7af945262841a3 100644 --- a/base/win/event_trace_consumer_unittest.cc +++ b/base/win/event_trace_consumer_unittest.cc @@ -12,9 +12,9 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/process.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/win/event_trace_controller.h" #include "base/win/event_trace_provider.h" @@ -356,7 +356,7 @@ class EtwTraceConsumerDataTest: public EtwTraceConsumerBaseTest { } EventQueue events_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath temp_file_; }; diff --git a/base/win/event_trace_controller_unittest.cc b/base/win/event_trace_controller_unittest.cc index 2e3a403acf0b1e..fae606e92e6ea2 100644 --- a/base/win/event_trace_controller_unittest.cc +++ b/base/win/event_trace_controller_unittest.cc @@ -9,9 +9,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/process.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/sys_info.h" #include "base/win/event_trace_controller.h" @@ -161,7 +161,7 @@ TEST_F(EtwTraceControllerTest, StartRealTimeSession) { } TEST_F(EtwTraceControllerTest, StartFileSession) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp; ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_dir.path(), &temp)); diff --git a/base/win/shortcut_unittest.cc b/base/win/shortcut_unittest.cc index e13bc28cb52021..26b22bef64e8ee 100644 --- a/base/win/shortcut_unittest.cc +++ b/base/win/shortcut_unittest.cc @@ -8,7 +8,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/test/test_file_util.h" #include "base/test/test_shortcut_win.h" #include "base/win/scoped_com_initializer.h" @@ -62,8 +62,8 @@ class ShortcutTest : public testing::Test { } base::win::ScopedCOMInitializer com_initializer_; - ScopedTempDir temp_dir_; - ScopedTempDir temp_dir_2_; + base::ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_2_; // The link file to be created/updated in the shortcut tests below. FilePath link_file_; diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc index 0c863b2d06f3f1..411c29653ffaee 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc @@ -5,10 +5,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/time_formatting.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "base/time.h" @@ -116,7 +116,7 @@ class BookmarkHTMLWriterTest : public testing::Test { BookmarkEntryToString(entry)); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath path_; }; diff --git a/chrome/browser/browser_encoding_browsertest.cc b/chrome/browser/browser_encoding_browsertest.cc index e0bf0bfd1b47e1..0bdecf08067ff1 100644 --- a/chrome/browser/browser_encoding_browsertest.cc +++ b/chrome/browser/browser_encoding_browsertest.cc @@ -4,7 +4,7 @@ #include "base/bind.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/character_encoding.h" #include "chrome/browser/net/url_request_mock_util.h" #include "chrome/browser/prefs/pref_service.h" @@ -65,7 +65,7 @@ class BrowserEncodingTest : public InProcessBrowserTest { base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath save_dir_; FilePath temp_sub_resource_dir_; }; diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc index 4e5d3c4cab25a1..e28787453e76ac 100644 --- a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc @@ -5,11 +5,11 @@ #include "testing/gtest/include/gtest/gtest.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" -#include "base/message_loop_proxy.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" +#include "base/message_loop_proxy.h" #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" #include "content/public/test/test_browser_thread.h" #include "webkit/quota/mock_storage_client.h" @@ -119,7 +119,7 @@ class BrowsingDataQuotaHelperTest : public testing::Test { content::TestBrowserThread io_thread_; scoped_refptr quota_manager_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; scoped_refptr helper_; bool fetching_completed_; diff --git a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc index c8390b62bbd5f2..a97316d0fa6b80 100644 --- a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc +++ b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc @@ -65,7 +65,7 @@ class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest { // Test BrowsingDataRemover for downloads. IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, Download) { - ScopedTempDir downloads_directory; + base::ScopedTempDir downloads_directory; ASSERT_TRUE(downloads_directory.CreateUniqueTempDir()); browser()->profile()->GetPrefs()->SetFilePath( prefs::kDownloadDefaultDirectory, downloads_directory.path()); diff --git a/chrome/browser/chromeos/contacts/contact_database_unittest.cc b/chrome/browser/chromeos/contacts/contact_database_unittest.cc index af7b818377c020..08e09cd1381712 100644 --- a/chrome/browser/chromeos/contacts/contact_database_unittest.cc +++ b/chrome/browser/chromeos/contacts/contact_database_unittest.cc @@ -9,10 +9,10 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/chromeos/contacts/contact.pb.h" #include "chrome/browser/chromeos/contacts/contact_test_util.h" #include "content/public/browser/browser_thread.h" @@ -133,7 +133,7 @@ class ContactDatabaseTest : public testing::Test { content::TestBrowserThread ui_thread_; // Temporary directory where the database is saved. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // This class retains ownership of this object. ContactDatabase* db_; diff --git a/chrome/browser/chromeos/cros/network_library_unittest.cc b/chrome/browser/chromeos/cros/network_library_unittest.cc index 47b81fcd972d45..8e33ced5715249 100644 --- a/chrome/browser/chromeos/cros/network_library_unittest.cc +++ b/chrome/browser/chromeos/cros/network_library_unittest.cc @@ -5,15 +5,15 @@ #include #include -#include #include +#include #include "base/at_exit.h" #include "base/callback.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/lazy_instance.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/network_library.h" #include "chrome/browser/chromeos/cros/onc_network_parser.h" diff --git a/chrome/browser/chromeos/drive/drive_cache_metadata_unittest.cc b/chrome/browser/chromeos/drive/drive_cache_metadata_unittest.cc index e440655b7339d3..cb4cf9fa5bd6a7 100644 --- a/chrome/browser/chromeos/drive/drive_cache_metadata_unittest.cc +++ b/chrome/browser/chromeos/drive/drive_cache_metadata_unittest.cc @@ -5,7 +5,7 @@ #include "chrome/browser/chromeos/drive/drive_cache_metadata.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/chromeos/drive/drive.pb.h" #include "chrome/browser/chromeos/drive/drive_file_system_util.h" #include "chrome/browser/chromeos/drive/drive_test_util.h" @@ -128,7 +128,7 @@ class DriveCacheMetadataTest : public testing::Test { } } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr metadata_; std::vector cache_paths_; FilePath persistent_directory_; diff --git a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc index f7fed8a3e5e2a3..1c5f8643a83935 100644 --- a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc +++ b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc @@ -10,11 +10,11 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/threading/sequenced_worker_pool.h" #include "base/values.h" @@ -1276,7 +1276,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_RegularFile) { callback_helper_.get()); // Prepare a local file. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath local_src_file_path = temp_dir.path().Append("local.txt"); const std::string kContent = "hello"; @@ -1310,7 +1310,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) { // Prepare a local file, which is a json file of a hosted document, which // matches "Document 1" in root_feed.json. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath local_src_file_path = temp_dir.path().Append("local.gdoc"); const std::string kEditUrl = @@ -1365,7 +1365,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_RegularFile) { base::Bind(&CallbackHelper::FileOperationCallback, callback_helper_.get()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath local_dest_file_path = temp_dir.path().Append("local_copy.txt"); @@ -1421,7 +1421,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_HostedDocument) { base::Bind(&CallbackHelper::FileOperationCallback, callback_helper_.get()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath local_dest_file_path = temp_dir.path().Append("local_copy.txt"); FilePath remote_src_file_path(FILE_PATH_LITERAL("drive/Document 1.gdoc")); diff --git a/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc b/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc index 6314a3166c30b7..b3e621f52d3d8f 100644 --- a/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc +++ b/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc @@ -10,10 +10,10 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_timeouts.h" #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/chromeos/drive/drive.pb.h" @@ -313,7 +313,7 @@ class DriveSyncClientTest : public testing::Test { MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread io_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; scoped_ptr > mock_file_system_; DriveCache* cache_; diff --git a/chrome/browser/chromeos/extensions/default_app_order_unittest.cc b/chrome/browser/chromeos/extensions/default_app_order_unittest.cc index dee6f52eeae33c..56d1a56360c8fb 100644 --- a/chrome/browser/chromeos/extensions/default_app_order_unittest.cc +++ b/chrome/browser/chromeos/extensions/default_app_order_unittest.cc @@ -9,9 +9,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/test/scoped_path_override.h" #include "chrome/common/chrome_paths.h" #include "testing/gtest/include/gtest/gtest.h" @@ -63,7 +63,7 @@ class DefaultAppOrderTest : public testing::Test { private: std::vector built_in_default_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr path_override_; DISALLOW_COPY_AND_ASSIGN(DefaultAppOrderTest); diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc index 5bf8dbb0e6886f..d0caaa1ef819df 100644 --- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc +++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc @@ -5,11 +5,11 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop_proxy.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/threading/worker_pool.h" #include "base/values.h" #include "chrome/browser/chromeos/drive/drive_file_system.h" @@ -254,7 +254,7 @@ class RestrictedFileSystemExtensionApiTest : public ExtensionApiTest { } protected: - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; FilePath mount_point_dir_; }; @@ -293,7 +293,7 @@ class RemoteFileSystemExtensionApiTest : public ExtensionApiTest { } protected: - ScopedTempDir test_cache_root_; + base::ScopedTempDir test_cache_root_; google_apis::MockDriveService* mock_drive_service_; }; @@ -321,10 +321,10 @@ IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) { AddTmpMountPoint(); ResultCatcher catcher; - ScopedTempDir tmp_dir; + base::ScopedTempDir tmp_dir; ASSERT_TRUE(tmp_dir.CreateUniqueTempDir()); - // Create a test file inside the ScopedTempDir. + // Create a test file inside the base::ScopedTempDir. FilePath test_file = tmp_dir.path().AppendASCII("text_file.xul"); CreateFileWithContent(test_file, kTestFileContent); diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api_test.cc b/chrome/browser/chromeos/extensions/file_browser_handler_api_test.cc index 5ffca6c8c929ab..56891008874383 100644 --- a/chrome/browser/chromeos/extensions/file_browser_handler_api_test.cc +++ b/chrome/browser/chromeos/extensions/file_browser_handler_api_test.cc @@ -9,8 +9,8 @@ #include #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_function_test_utils.h" @@ -217,7 +217,7 @@ class FileBrowserHandlerExtensionTest : public ExtensionApiTest { static const std::vector* test_cases_; static size_t current_test_case_; - ScopedTempDir scoped_tmp_dir_; + base::ScopedTempDir scoped_tmp_dir_; // Our test mount point path. FilePath tmp_mount_point_; }; diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc index f632d7b467d488..dcccc6eb0f9f03 100644 --- a/chrome/browser/chromeos/login/login_utils_browsertest.cc +++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc @@ -7,9 +7,9 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/command_line.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/synchronization/waitable_event.h" #include "base/threading/sequenced_worker_pool.h" @@ -463,7 +463,7 @@ class LoginUtilsTest : public testing::Test, Profile* prepared_profile_; private: - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; std::string device_policy_; std::string user_policy_; diff --git a/chrome/browser/chromeos/settings/owner_key_util_unittest.cc b/chrome/browser/chromeos/settings/owner_key_util_unittest.cc index c0ca8d67d15300..8f6229907f3746 100644 --- a/chrome/browser/chromeos/settings/owner_key_util_unittest.cc +++ b/chrome/browser/chromeos/settings/owner_key_util_unittest.cc @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "crypto/rsa_private_key.h" #include "testing/gtest/include/gtest/gtest.h" @@ -58,7 +58,7 @@ class OwnerKeyUtilTest : public testing::Test { util_ = new OwnerKeyUtilImpl(key_file_); } - ScopedTempDir tmpdir_; + base::ScopedTempDir tmpdir_; FilePath key_file_; scoped_refptr util_; diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc index 75cbf5bca468cf..a3b6506dae8c72 100644 --- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc +++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc @@ -4,9 +4,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/observer_list.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/value_conversions.h" @@ -280,7 +280,7 @@ class ChromeDownloadManagerDelegateTest : const FilePath& intermediate_path); TestingPrefService* pref_service_; - ScopedTempDir test_download_dir_; + base::ScopedTempDir test_download_dir_; content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; scoped_refptr download_manager_; diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 5346f84fe0c09c..0511dcd4b8dee1 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -8,9 +8,9 @@ #include "base/bind_helpers.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/stringprintf.h" #include "base/test/test_file_util.h" @@ -834,7 +834,7 @@ class DownloadTest : public InProcessBrowserTest { FilePath test_dir_; // Location of the downloads directory for these tests - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; scoped_ptr file_chooser_observer_; }; @@ -1746,7 +1746,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadUrlToPath) { WebContents* web_contents = chrome::GetActiveWebContents(browser()); ASSERT_TRUE(web_contents); - ScopedTempDir other_directory; + base::ScopedTempDir other_directory; ASSERT_TRUE(other_directory.CreateUniqueTempDir()); FilePath target_file_full_path = other_directory.path().Append(file.BaseName()); diff --git a/chrome/browser/download/download_path_reservation_tracker_unittest.cc b/chrome/browser/download/download_path_reservation_tracker_unittest.cc index ac862eb13765a3..304d875529a869 100644 --- a/chrome/browser/download/download_path_reservation_tracker_unittest.cc +++ b/chrome/browser/download/download_path_reservation_tracker_unittest.cc @@ -4,10 +4,10 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/observer_list.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_file_util.h" #include "chrome/browser/download/download_path_reservation_tracker.h" #include "chrome/browser/download/download_util.h" @@ -84,7 +84,7 @@ class DownloadPathReservationTrackerTest : public testing::Test { } protected: - ScopedTempDir test_download_dir_; + base::ScopedTempDir test_download_dir_; FilePath default_download_path_; MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 37eab12071580e..edc733d3a46ebc 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -7,8 +7,8 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_file_util.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/api/prefs/pref_member.h" @@ -356,7 +356,7 @@ class SavePageBrowserTest : public InProcessBrowserTest { FilePath test_dir_; // Temporary directory we will save pages to. - ScopedTempDir save_dir_; + base::ScopedTempDir save_dir_; private: DISALLOW_COPY_AND_ASSIGN(SavePageBrowserTest); diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc index ad2605ed231e0d..7c0117fe7d451d 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc @@ -5,10 +5,10 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/stringprintf.h" #include "chrome/browser/download/download_file_icon_extractor.h" @@ -535,7 +535,7 @@ class DownloadExtensionTest : public ExtensionApiTest { downloads_directory_.path()); } - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; const extensions::Extension* extension_; Browser* incognito_browser_; Browser* current_browser_; @@ -1018,7 +1018,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, EXPECT_STREQ("hello", result_string.c_str()); } - // The temporary files should be cleaned up when the ScopedTempDir is removed. + // The temporary files should be cleaned up when the base::ScopedTempDir is removed. } // Test passing the empty query to search(). diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc index b2575b5fa4de58..5497cd7ee1a2bd 100644 --- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc +++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc @@ -37,7 +37,7 @@ class FileSystemApiTest : public extensions::PlatformAppBrowserTest { } FilePath test_root_folder_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) { diff --git a/chrome/browser/extensions/api/management/management_api_browsertest.cc b/chrome/browser/extensions/api/management/management_api_browsertest.cc index e8c71f7fb48d0e..193c2435d0804d 100644 --- a/chrome/browser/extensions/api/management/management_api_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_api_browsertest.cc @@ -4,7 +4,7 @@ #include "base/command_line.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "chrome/browser/extensions/api/management/management_api.h" @@ -215,7 +215,7 @@ class ExtensionManagementApiEscalationTest : private: - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; }; const char ExtensionManagementApiEscalationTest::kId[] = diff --git a/chrome/browser/extensions/api/record/record_api_test.cc b/chrome/browser/extensions/api/record/record_api_test.cc index d7d5d6c493ccc1..a9fdf30818341f 100644 --- a/chrome/browser/extensions/api/record/record_api_test.cc +++ b/chrome/browser/extensions/api/record/record_api_test.cc @@ -6,14 +6,14 @@ #include -#include "base/memory/ref_counted.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/string_split.h" -#include "base/stringprintf.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/threading/sequenced_worker_pool.h" #include "base/values.h" #include "chrome/browser/extensions/extension_function_test_utils.h" @@ -270,14 +270,14 @@ class RecordApiTest : public InProcessBrowserTest { std::vector temp_files_; private: - ScopedTempDir scoped_temp_user_data_dir_; + base::ScopedTempDir scoped_temp_user_data_dir_; DISALLOW_COPY_AND_ASSIGN(RecordApiTest); }; IN_PROC_BROWSER_TEST_F(RecordApiTest, CheckCapture) { - ScopedTempDir user_data_dir; + base::ScopedTempDir user_data_dir; scoped_ptr result; EXPECT_TRUE(user_data_dir.CreateUniqueTempDir()); @@ -304,7 +304,7 @@ IN_PROC_BROWSER_TEST_F(RecordApiTest, CheckCapture) { #define MAYBE_CheckPlayback CheckPlayback #endif IN_PROC_BROWSER_TEST_F(RecordApiTest, MAYBE_CheckPlayback) { - ScopedTempDir user_data_dir; + base::ScopedTempDir user_data_dir; EXPECT_TRUE(user_data_dir.CreateUniqueTempDir()); diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc index e23ef8536a49ea..6f4dcb06ab2911 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc @@ -8,13 +8,13 @@ #include "base/file_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" +#include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" #include "chrome/browser/extensions/bundle_installer.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_function_test_utils.h" #include "chrome/browser/extensions/extension_install_prompt.h" #include "chrome/browser/extensions/extension_install_ui.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" #include "chrome/browser/extensions/webstore_installer.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -153,7 +153,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest { return browser()->profile()->GetExtensionService(); } - ScopedTempDir tmp_; + base::ScopedTempDir tmp_; }; class ExtensionWebstorePrivateBundleTest @@ -187,7 +187,7 @@ class ExtensionWebstorePrivateBundleTest // Packs the |manifest| file into a CRX using |id|'s PEM key. void PackCRX(const std::string& id, const std::string& manifest) { // Move the extension to a temporary directory. - ScopedTempDir tmp; + base::ScopedTempDir tmp; ASSERT_TRUE(tmp.CreateUniqueTempDir()); ASSERT_TRUE(file_util::CreateDirectory(tmp.path())); @@ -300,7 +300,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallAccepted) { // Test having the default download directory missing. IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, MissingDownloadDir) { // Set a non-existent directory as the download path. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath missing_directory = temp_dir.Take(); EXPECT_TRUE(file_util::Delete(missing_directory, true)); diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc index a052e72dcba306..39fce5b192d489 100644 --- a/chrome/browser/extensions/app_background_page_apitest.cc +++ b/chrome/browser/extensions/app_background_page_apitest.cc @@ -77,7 +77,7 @@ class AppBackgroundPageApiTest : public ExtensionApiTest { } private: - ScopedTempDir app_dir_; + base::ScopedTempDir app_dir_; }; // Disable on Mac only. http://crbug.com/95139 diff --git a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc index 380a1c739d8fe6..b761c58687fcd9 100644 --- a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc +++ b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc @@ -229,7 +229,7 @@ class AppNotificationManagerSyncTest : public testing::Test { content::TestBrowserThread file_thread_; // We keep two TemplateURLServices to test syncing between them. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; scoped_refptr model_; diff --git a/chrome/browser/extensions/app_notification_manager_unittest.cc b/chrome/browser/extensions/app_notification_manager_unittest.cc index 27c1ebf33b06de..70ebfc9a01b3a2 100644 --- a/chrome/browser/extensions/app_notification_manager_unittest.cc +++ b/chrome/browser/extensions/app_notification_manager_unittest.cc @@ -70,7 +70,7 @@ class AppNotificationManagerTest : public testing::Test { MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; scoped_refptr mgr_; }; diff --git a/chrome/browser/extensions/app_notification_storage_unittest.cc b/chrome/browser/extensions/app_notification_storage_unittest.cc index f6328790dd8182..ac073a97a85f21 100644 --- a/chrome/browser/extensions/app_notification_storage_unittest.cc +++ b/chrome/browser/extensions/app_notification_storage_unittest.cc @@ -4,10 +4,10 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "chrome/browser/extensions/app_notification.h" #include "chrome/browser/extensions/app_notification_storage.h" @@ -46,7 +46,7 @@ class AppNotificationStorageTest : public testing::Test { MessageLoop message_loop_; content::TestBrowserThread file_thread_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; FilePath storage_path_; scoped_ptr storage_; }; diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc index 007aff39710f82..5f85f5c970e3aa 100644 --- a/chrome/browser/extensions/convert_user_script.cc +++ b/chrome/browser/extensions/convert_user_script.cc @@ -10,16 +10,16 @@ #include "base/base64.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_file_util.h" +#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/user_script.h" #include "crypto/sha2.h" #include "googleurl/src/gurl.h" @@ -57,7 +57,7 @@ scoped_refptr ConvertUserScriptToExtension( return NULL; } - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; if (!temp_dir.CreateUniqueTempDirUnderPath(install_temp_dir)) { *error = ASCIIToUTF16("Could not create temporary directory."); return NULL; diff --git a/chrome/browser/extensions/convert_user_script_unittest.cc b/chrome/browser/extensions/convert_user_script_unittest.cc index 190163658a07b8..2853d7914822b0 100644 --- a/chrome/browser/extensions/convert_user_script_unittest.cc +++ b/chrome/browser/extensions/convert_user_script_unittest.cc @@ -7,9 +7,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/convert_user_script.h" #include "chrome/common/chrome_paths.h" @@ -28,7 +28,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) { namespace extensions { TEST(ExtensionFromUserScript, Basic) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -45,7 +45,7 @@ TEST(ExtensionFromUserScript, Basic) { EXPECT_EQ(string16(), error); // Use a temp dir so that the extensions dir will clean itself up. - ScopedTempDir ext_dir; + base::ScopedTempDir ext_dir; EXPECT_TRUE(ext_dir.Set(extension->path())); // Validate generated extension metadata. @@ -78,7 +78,7 @@ TEST(ExtensionFromUserScript, Basic) { } TEST(ExtensionFromUserScript, NoMetdata) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -95,7 +95,7 @@ TEST(ExtensionFromUserScript, NoMetdata) { EXPECT_EQ(string16(), error); // Use a temp dir so that the extensions dir will clean itself up. - ScopedTempDir ext_dir; + base::ScopedTempDir ext_dir; EXPECT_TRUE(ext_dir.Set(extension->path())); // Validate generated extension metadata. @@ -124,7 +124,7 @@ TEST(ExtensionFromUserScript, NoMetdata) { } TEST(ExtensionFromUserScript, NotUTF8) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -142,7 +142,7 @@ TEST(ExtensionFromUserScript, NotUTF8) { } TEST(ExtensionFromUserScript, RunAtDocumentStart) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -159,7 +159,7 @@ TEST(ExtensionFromUserScript, RunAtDocumentStart) { EXPECT_EQ(string16(), error); // Use a temp dir so that the extensions dir will clean itself up. - ScopedTempDir ext_dir; + base::ScopedTempDir ext_dir; EXPECT_TRUE(ext_dir.Set(extension->path())); // Validate generated extension metadata. @@ -175,7 +175,7 @@ TEST(ExtensionFromUserScript, RunAtDocumentStart) { } TEST(ExtensionFromUserScript, RunAtDocumentEnd) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -192,7 +192,7 @@ TEST(ExtensionFromUserScript, RunAtDocumentEnd) { EXPECT_EQ(string16(), error); // Use a temp dir so that the extensions dir will clean itself up. - ScopedTempDir ext_dir; + base::ScopedTempDir ext_dir; EXPECT_TRUE(ext_dir.Set(extension->path())); // Validate generated extension metadata. @@ -208,7 +208,7 @@ TEST(ExtensionFromUserScript, RunAtDocumentEnd) { } TEST(ExtensionFromUserScript, RunAtDocumentIdle) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); FilePath test_file; @@ -226,7 +226,7 @@ TEST(ExtensionFromUserScript, RunAtDocumentIdle) { EXPECT_EQ(string16(), error); // Use a temp dir so that the extensions dir will clean itself up. - ScopedTempDir ext_dir; + base::ScopedTempDir ext_dir; EXPECT_TRUE(ext_dir.Set(extension->path())); // Validate generated extension metadata. diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc index ea8c8c70b90ea0..497297d1209bf1 100644 --- a/chrome/browser/extensions/convert_web_app.cc +++ b/chrome/browser/extensions/convert_web_app.cc @@ -12,17 +12,17 @@ #include "base/base64.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/logging.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_file_util.h" +#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/web_apps.h" #include "crypto/sha2.h" #include "googleurl/src/gurl.h" @@ -94,7 +94,7 @@ scoped_refptr ConvertWebAppToExtension( return NULL; } - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; if (!temp_dir.CreateUniqueTempDirUnderPath(install_temp_dir)) { LOG(ERROR) << "Could not create temporary directory."; return NULL; diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc index f726acc88c8a55..fe97b66aed285d 100644 --- a/chrome/browser/extensions/convert_web_app_unittest.cc +++ b/chrome/browser/extensions/convert_web_app_unittest.cc @@ -9,8 +9,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -93,7 +93,7 @@ TEST(ExtensionFromWebApp, GenerateVersion) { } TEST(ExtensionFromWebApp, Basic) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); WebApplicationInfo web_app; @@ -116,7 +116,7 @@ TEST(ExtensionFromWebApp, Basic) { extensions_dir.path()); ASSERT_TRUE(extension.get()); - ScopedTempDir extension_dir; + base::ScopedTempDir extension_dir; EXPECT_TRUE(extension_dir.Set(extension->path())); EXPECT_TRUE(extension->is_app()); @@ -150,7 +150,7 @@ TEST(ExtensionFromWebApp, Basic) { } TEST(ExtensionFromWebApp, Minimal) { - ScopedTempDir extensions_dir; + base::ScopedTempDir extensions_dir; ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); WebApplicationInfo web_app; @@ -163,7 +163,7 @@ TEST(ExtensionFromWebApp, Minimal) { extensions_dir.path()); ASSERT_TRUE(extension.get()); - ScopedTempDir extension_dir; + base::ScopedTempDir extension_dir; EXPECT_TRUE(extension_dir.Set(extension->path())); EXPECT_TRUE(extension->is_app()); diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index 5076c7867d8d71..121e2916c4b073 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -9,10 +9,10 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/lazy_instance.h" #include "base/metrics/histogram.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/sequenced_task_runner.h" #include "base/string_util.h" #include "base/stringprintf.h" diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 56ff0b6b6fa6dc..0d07120c389f8a 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -9,8 +9,8 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h index 8f9f1e19e3e2b4..b1e82a0b1a999f 100644 --- a/chrome/browser/extensions/extension_browsertest.h +++ b/chrome/browser/extensions/extension_browsertest.h @@ -10,11 +10,11 @@ #include "base/command_line.h" #include "base/compiler_specific.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/features/feature.h" #include "chrome/common/extensions/feature_switch.h" +#include "chrome/common/extensions/features/feature.h" #include "chrome/test/base/in_process_browser_test.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_observer.h" @@ -204,7 +204,7 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest, private: // Temporary directory for testing. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Specifies the type of UI (if any) to show during installation and what // user action to simulate. diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index 7c06df6a0e4479..c04c4869696eab 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -10,8 +10,8 @@ #include "base/bind.h" #include "base/callback.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_handle.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/browser/extensions/crx_file.h" #include "chrome/browser/extensions/extension_creator_filter.h" @@ -308,7 +308,7 @@ bool ExtensionCreator::Run(const FilePath& extension_dir, if (!ValidateManifest(extension_dir, key_pair.get(), run_flags)) return false; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; if (!temp_dir.CreateUniqueTempDir()) return false; diff --git a/chrome/browser/extensions/extension_creator_filter_unittest.cc b/chrome/browser/extensions/extension_creator_filter_unittest.cc index 59e624b672362a..657624bf22eb3a 100644 --- a/chrome/browser/extensions/extension_creator_filter_unittest.cc +++ b/chrome/browser/extensions/extension_creator_filter_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/extensions/extension_creator_filter.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -32,7 +32,7 @@ class ExtensionCreatorFilterTest : public PlatformTest { scoped_refptr filter_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath test_dir_; }; diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc index 9a12338fbf1e8a..f2fea1901fc606 100644 --- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_prefs.h" @@ -84,7 +84,7 @@ class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest { } ExtensionService* service_; - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; FilePath path_v1_; FilePath path_v2_; FilePath path_v3_; diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc index 761908cc30985a..87a9ba5b8f9902 100644 --- a/chrome/browser/extensions/extension_prefs_unittest.cc +++ b/chrome/browser/extensions/extension_prefs_unittest.cc @@ -5,17 +5,17 @@ #include "extension_prefs_unittest.h" #include "base/basictypes.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/prefs/public/pref_change_registrar.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "base/stringprintf.h" #include "base/values.h" #include "chrome/browser/extensions/extension_pref_value_map.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/browser/prefs/pref_observer_mock.h" +#include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/permissions/permission_set.h" diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index 1d19fa0118e445..f74f0cfb5db3aa 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -13,6 +13,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/json/json_reader.h" #include "base/json/json_string_value_serializer.h" @@ -20,7 +21,6 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string16.h" #include "base/string_number_conversions.h" @@ -633,7 +633,7 @@ class ExtensionServiceTest InstallState install_state, int creation_flags) { FilePath crx_path; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); crx_path = temp_dir.path().AppendASCII("temp.crx"); @@ -1826,7 +1826,7 @@ TEST_F(ExtensionServiceTest, PackExtension) { .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj") .AppendASCII("1.0.0.0"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath output_directory = temp_dir.path(); @@ -1864,7 +1864,7 @@ TEST_F(ExtensionServiceTest, PackExtension) { // Try packing an empty directory. Should fail because an empty directory is // not a valid extension. - ScopedTempDir temp_dir2; + base::ScopedTempDir temp_dir2; ASSERT_TRUE(temp_dir2.CreateUniqueTempDir()); creator.reset(new ExtensionCreator()); ASSERT_FALSE(creator->Run(temp_dir2.path(), crx_path, privkey_path, @@ -1889,7 +1889,7 @@ TEST_F(ExtensionServiceTest, PackPunctuatedExtension) { .AppendASCII(good0) .AppendASCII("1.0.0.0"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Extension names containing punctuation, and the expected names for the @@ -1946,7 +1946,7 @@ TEST_F(ExtensionServiceTest, PackPunctuatedExtension) { TEST_F(ExtensionServiceTest, PackExtensionContainingKeyFails) { InitializeEmptyExtensionService(); - ScopedTempDir extension_temp_dir; + base::ScopedTempDir extension_temp_dir; ASSERT_TRUE(extension_temp_dir.CreateUniqueTempDir()); FilePath input_directory = extension_temp_dir.path().AppendASCII("ext"); ASSERT_TRUE(file_util::CopyDirectory( @@ -1958,7 +1958,7 @@ TEST_F(ExtensionServiceTest, PackExtensionContainingKeyFails) { input_directory, /*recursive=*/true)); - ScopedTempDir output_temp_dir; + base::ScopedTempDir output_temp_dir; ASSERT_TRUE(output_temp_dir.CreateUniqueTempDir()); FilePath output_directory = output_temp_dir.path(); @@ -2003,7 +2003,7 @@ TEST_F(ExtensionServiceTest, PackExtensionOpenSSLKey) { "openssl_privkey_asn1.pem")); ASSERT_TRUE(file_util::PathExists(privkey_path)); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath output_directory = temp_dir.path(); @@ -2075,7 +2075,7 @@ TEST_F(ExtensionServiceTest, LoadLocalizedTheme) { TEST_F(ExtensionServiceTest, UnpackedExtensionCanChangeID) { InitializeEmptyExtensionService(); - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath extension_path = temp.path(); @@ -2127,7 +2127,7 @@ TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) { ASSERT_TRUE(file_util::PathExists(source_icon)); // Set up the temporary extension directory. - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath extension_path = temp.path(); FilePath manifest = extension_path.Append(Extension::kManifestFilename); @@ -2570,7 +2570,7 @@ TEST_F(ExtensionServiceTest, UpdateExtensionPreservesLocation) { TEST_F(ExtensionServiceTest, LoadExtensionsCanDowngrade) { InitializeEmptyExtensionService(); - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); // We'll write the extension manifest dynamically to a temporary path diff --git a/chrome/browser/extensions/extension_service_unittest.h b/chrome/browser/extensions/extension_service_unittest.h index 64aef9b7270caa..2da36f698ad3b3 100644 --- a/chrome/browser/extensions/extension_service_unittest.h +++ b/chrome/browser/extensions/extension_service_unittest.h @@ -7,10 +7,10 @@ #include "base/at_exit.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/common/extensions/feature_switch.h" #include "content/public/test/test_browser_thread.h" @@ -56,7 +56,7 @@ class ExtensionServiceTestBase : public testing::Test { MessageLoop loop_; base::ShadowingAtExitManager at_exit_manager_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; FilePath extensions_install_dir_; FilePath data_dir_; diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc index c8f8c24bcb0420..c707144482e6f5 100644 --- a/chrome/browser/extensions/menu_manager_unittest.cc +++ b/chrome/browser/extensions/menu_manager_unittest.cc @@ -4,20 +4,20 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/json/json_reader.h" #include "base/memory/scoped_vector.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/extensions/event_names.h" #include "chrome/browser/extensions/event_router.h" #include "chrome/browser/extensions/extension_system_factory.h" #include "chrome/browser/extensions/menu_manager.h" -#include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/extensions/test_extension_prefs.h" #include "chrome/browser/extensions/test_extension_system.h" +#include "chrome/browser/prefs/pref_service.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" diff --git a/chrome/browser/extensions/sandboxed_unpacker.h b/chrome/browser/extensions/sandboxed_unpacker.h index 67af256120abe2..dc337c71f88066 100644 --- a/chrome/browser/extensions/sandboxed_unpacker.h +++ b/chrome/browser/extensions/sandboxed_unpacker.h @@ -8,8 +8,8 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/extensions/extension.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/utility_process_host_client.h" @@ -205,7 +205,7 @@ class SandboxedUnpacker : public content::UtilityProcessHostClient { FilePath extensions_dir_; // A temporary directory to use for unpacking. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // The root directory of the unpacked extension. This is a child of temp_dir_. FilePath extension_root_; diff --git a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc index 11c4dd1250f01c..7c050b50d9e842 100644 --- a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc +++ b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc @@ -3,11 +3,10 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/values.h" #include "chrome/browser/extensions/sandboxed_unpacker.h" @@ -157,8 +156,8 @@ class SandboxedUnpackerTest : public testing::Test { } protected: - ScopedTempDir temp_dir_; - ScopedTempDir extensions_dir_; + base::ScopedTempDir temp_dir_; + base::ScopedTempDir extensions_dir_; FilePath temp_path_; MockSandboxedUnpackerClient* client_; scoped_ptr unpacker_; diff --git a/chrome/browser/extensions/settings/settings_frontend_unittest.cc b/chrome/browser/extensions/settings/settings_frontend_unittest.cc index 0e4ef16595f0a1..570d2a3bebb1c6 100644 --- a/chrome/browser/extensions/settings/settings_frontend_unittest.cc +++ b/chrome/browser/extensions/settings/settings_frontend_unittest.cc @@ -6,9 +6,9 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "chrome/browser/extensions/settings/leveldb_settings_storage_factory.h" #include "chrome/browser/extensions/settings/settings_frontend.h" @@ -77,7 +77,7 @@ class ExtensionSettingsFrontendTest : public testing::Test { SettingsFrontend::Create(storage_factory_.get(), profile_.get())); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; scoped_ptr frontend_; scoped_refptr storage_factory_; diff --git a/chrome/browser/extensions/settings/settings_sync_unittest.cc b/chrome/browser/extensions/settings/settings_sync_unittest.cc index 1fb541583e4653..9722558c3efa70 100644 --- a/chrome/browser/extensions/settings/settings_sync_unittest.cc +++ b/chrome/browser/extensions/settings/settings_sync_unittest.cc @@ -5,11 +5,11 @@ #include "testing/gtest/include/gtest/gtest.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/extensions/settings/leveldb_settings_storage_factory.h" #include "chrome/browser/extensions/settings/settings_frontend.h" #include "chrome/browser/extensions/settings/settings_storage_factory.h" @@ -255,7 +255,7 @@ class ExtensionSettingsSyncTest : public testing::Test { content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; scoped_ptr frontend_; scoped_refptr storage_factory_; diff --git a/chrome/browser/extensions/test_extension_prefs.h b/chrome/browser/extensions/test_extension_prefs.h index dfd05e2a03de80..b4b92dde87de23 100644 --- a/chrome/browser/extensions/test_extension_prefs.h +++ b/chrome/browser/extensions/test_extension_prefs.h @@ -7,8 +7,8 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/extensions/extension.h" class ExtensionPrefValueMap; @@ -72,7 +72,7 @@ class TestExtensionPrefs { void set_extensions_disabled(bool extensions_disabled); protected: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath preferences_file_; FilePath extensions_dir_; scoped_ptr pref_service_; diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc index 0aabb5ad876831..02bfaa4004cc1c 100644 --- a/chrome/browser/extensions/user_script_master_unittest.cc +++ b/chrome/browser/extensions/user_script_master_unittest.cc @@ -8,9 +8,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/testing_profile.h" @@ -74,7 +74,7 @@ class UserScriptMasterTest : public testing::Test, } // Directory containing user scripts. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/history/android/android_cache_database_unittest.cc b/chrome/browser/history/android/android_cache_database_unittest.cc index 650fea63f19c1b..4e4b44efdb8b15 100644 --- a/chrome/browser/history/android/android_cache_database_unittest.cc +++ b/chrome/browser/history/android/android_cache_database_unittest.cc @@ -4,7 +4,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/android/android_cache_database.h" #include "chrome/browser/history/android/android_time.h" @@ -36,13 +36,13 @@ class AndroidCacheDatabaseTest : public testing::Test { history_db_.InitAndroidCacheDatabase(android_cache_db_name_)); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath android_cache_db_name_; HistoryDatabase history_db_; }; TEST(AndroidCacheDatabaseAttachTest, AttachDatabaseInTransactionNesting) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; FilePath android_cache_db_name; HistoryDatabase history_db; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc index d118b423357a4a..d5496cc7fc6c2b 100644 --- a/chrome/browser/history/android/android_provider_backend_unittest.cc +++ b/chrome/browser/history/android/android_provider_backend_unittest.cc @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/api/bookmarks/bookmark_service.h" @@ -188,7 +188,7 @@ class AndroidProviderBackendTest : public testing::Test { scoped_refptr history_backend_; HistoryDatabase history_db_; ThumbnailDatabase thumbnail_db_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath android_cache_db_name_; FilePath history_db_name_; FilePath thumbnail_db_name_; diff --git a/chrome/browser/history/android/android_urls_database_unittest.cc b/chrome/browser/history/android/android_urls_database_unittest.cc index ed6883e61ff0c3..284db978cf6a48 100644 --- a/chrome/browser/history/android/android_urls_database_unittest.cc +++ b/chrome/browser/history/android/android_urls_database_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/history/history_database.h" #include "chrome/browser/history/history_unittest_base.h" #include "chrome/common/chrome_constants.h" diff --git a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc index 18a5c26c180cfb..b10b3badeea770 100644 --- a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc +++ b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc @@ -12,8 +12,8 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_constants.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_profile_manager.h" #include "chrome/test/base/testing_profile.h" +#include "chrome/test/base/testing_profile_manager.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/test_browser_thread.h" @@ -72,7 +72,7 @@ class BookmarkModelSQLHandlerTest : public testing::Test { MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; HistoryDatabase history_db_; }; diff --git a/chrome/browser/history/android/urls_sql_handler_unittest.cc b/chrome/browser/history/android/urls_sql_handler_unittest.cc index 2ed0b6bff89387..e2d83047b2d890 100644 --- a/chrome/browser/history/android/urls_sql_handler_unittest.cc +++ b/chrome/browser/history/android/urls_sql_handler_unittest.cc @@ -8,7 +8,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/android/visit_sql_handler.h" @@ -43,7 +43,7 @@ class UrlsSQLHandlerTest : public testing::Test { } HistoryDatabase history_db_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; UrlsSQLHandler urls_sql_handler_; VisitSQLHandler visit_sql_handler_; diff --git a/chrome/browser/history/android/visit_sql_handler_unittest.cc b/chrome/browser/history/android/visit_sql_handler_unittest.cc index a4a7829d84d73b..6c122488f07552 100644 --- a/chrome/browser/history/android/visit_sql_handler_unittest.cc +++ b/chrome/browser/history/android/visit_sql_handler_unittest.cc @@ -8,7 +8,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/android/urls_sql_handler.h" @@ -43,7 +43,7 @@ class VisitSQLHandlerTest : public testing::Test { } HistoryDatabase history_db_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; UrlsSQLHandler urls_sql_handler_; VisitSQLHandler visit_sql_handler_; diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc index dd07a2c7c16a1f..967fb6cdcf656e 100644 --- a/chrome/browser/history/expire_history_backend_unittest.cc +++ b/chrome/browser/history/expire_history_backend_unittest.cc @@ -10,9 +10,9 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string16.h" #include "base/utf_string_conversions.h" @@ -99,7 +99,7 @@ class ExpireHistoryTest : public testing::Test, const FilePath& path() const { return tmp_dir_.path(); } // This must be destroyed last. - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; BookmarkModel bookmark_model_; diff --git a/chrome/browser/history/history_database_unittest.cc b/chrome/browser/history/history_database_unittest.cc index 26aa731ceb9f73..622e706dac8d16 100644 --- a/chrome/browser/history/history_database_unittest.cc +++ b/chrome/browser/history/history_database_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/chrome_paths.h" #include "sql/init_status.h" #include "testing/gtest/include/gtest/gtest.h" @@ -15,7 +15,7 @@ namespace history { TEST(HistoryDatabaseTest, DropBookmarks) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; FilePath db_file; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); diff --git a/chrome/browser/history/history_querying_unittest.cc b/chrome/browser/history/history_querying_unittest.cc index 98ca3c5cd1f3c6..7ad3dbcbf6b4ac 100644 --- a/chrome/browser/history/history_querying_unittest.cc +++ b/chrome/browser/history/history_querying_unittest.cc @@ -7,8 +7,8 @@ #include "base/bind_helpers.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history.h" #include "testing/gtest/include/gtest/gtest.h" @@ -133,7 +133,7 @@ class HistoryQueryTest : public testing::Test { MessageLoop::current()->Quit(); // Will return out to QueryHistory. } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoop message_loop_; diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc index 364a5d0154e2c3..d41a02229ad0e3 100644 --- a/chrome/browser/history/history_unittest.cc +++ b/chrome/browser/history/history_unittest.cc @@ -29,10 +29,10 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_vector.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -151,7 +151,7 @@ class HistoryBackendDBTest : public testing::Test { return db_->CreateDownload(download); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoopForUI message_loop_; @@ -470,7 +470,7 @@ class HistoryTest : public testing::Test { MessageLoop::current()->Quit(); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoopForUI message_loop_; diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc index 834cfd91858bf1..a3bc69500146f7 100644 --- a/chrome/browser/history/in_memory_url_index_unittest.cc +++ b/chrome/browser/history/in_memory_url_index_unittest.cc @@ -7,9 +7,9 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -854,7 +854,7 @@ TEST_F(InMemoryURLIndexTest, WhitelistedURLs) { } TEST_F(InMemoryURLIndexTest, CacheSaveRestore) { - ScopedTempDir temp_directory; + base::ScopedTempDir temp_directory; ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); set_history_dir(temp_directory.path()); @@ -917,7 +917,7 @@ class InMemoryURLIndexCacheTest : public testing::Test { void set_history_dir(const FilePath& dir_path); bool GetCacheFilePath(FilePath* file_path) const; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr url_index_; }; diff --git a/chrome/browser/history/redirect_browsertest.cc b/chrome/browser/history/redirect_browsertest.cc index fd945d842af655..ce67692bba0a63 100644 --- a/chrome/browser/history/redirect_browsertest.cc +++ b/chrome/browser/history/redirect_browsertest.cc @@ -9,8 +9,8 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -128,7 +128,7 @@ IN_PROC_BROWSER_TEST_F(RedirectTest, ClientEmptyReferer) { final_url.spec().c_str()); // Write the contents to a temporary file. - ScopedTempDir temp_directory; + base::ScopedTempDir temp_directory; ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); FilePath temp_file; ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_directory.path(), diff --git a/chrome/browser/history/shortcuts_backend_unittest.cc b/chrome/browser/history/shortcuts_backend_unittest.cc index 70ce640161a0de..2a5e120c819c10 100644 --- a/chrome/browser/history/shortcuts_backend_unittest.cc +++ b/chrome/browser/history/shortcuts_backend_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/history/shortcuts_database_unittest.cc b/chrome/browser/history/shortcuts_database_unittest.cc index d05ae7ea0d885d..23b9049eff72de 100644 --- a/chrome/browser/history/shortcuts_database_unittest.cc +++ b/chrome/browser/history/shortcuts_database_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc index 15f9a260791b8b..03d8fdd2671761 100644 --- a/chrome/browser/history/text_database_unittest.cc +++ b/chrome/browser/history/text_database_unittest.cc @@ -5,8 +5,8 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/text_database.h" @@ -118,7 +118,7 @@ class TextDatabaseTest : public PlatformTest { } // Directory containing the databases. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Name of the main database file. FilePath file_name_; diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc index 1123e997ae6a59..2ba29dfd632c70 100644 --- a/chrome/browser/history/thumbnail_database_unittest.cc +++ b/chrome/browser/history/thumbnail_database_unittest.cc @@ -9,9 +9,9 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted_memory.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/history/history_database.h" #include "chrome/browser/history/history_unittest_base.h" #include "chrome/browser/history/thumbnail_database.h" @@ -79,7 +79,7 @@ class ThumbnailDatabaseTest : public testing::Test { scoped_ptr google_bitmap_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath file_name_; FilePath new_file_name_; FilePath history_db_name_; diff --git a/chrome/browser/history/top_sites_database_unittest.cc b/chrome/browser/history/top_sites_database_unittest.cc index abd681e487385b..f69d82c2d84e7c 100644 --- a/chrome/browser/history/top_sites_database_unittest.cc +++ b/chrome/browser/history/top_sites_database_unittest.cc @@ -4,7 +4,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/history/top_sites_database.h" #include "testing/gtest/include/gtest/gtest.h" @@ -18,7 +18,7 @@ class TopSitesDatabaseTest : public testing::Test { file_name_ = temp_dir_.path().AppendASCII("TestTopSites.db"); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath file_name_; }; diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc index f092db3f5dba92..0c9c5933d36518 100644 --- a/chrome/browser/history/top_sites_unittest.cc +++ b/chrome/browser/history/top_sites_unittest.cc @@ -5,13 +5,13 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" +#include "base/memory/weak_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "base/memory/weak_ptr.h" #include "chrome/browser/history/history_backend.h" #include "chrome/browser/history/history_database.h" #include "chrome/browser/history/history_marshaling.h" diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc index 485c9400c0feea..c16ae0164c4d07 100644 --- a/chrome/browser/history/url_database_unittest.cc +++ b/chrome/browser/history/url_database_unittest.cc @@ -4,8 +4,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/url_database.h" @@ -63,7 +63,7 @@ class URLDatabaseTest : public testing::Test, db_.Close(); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; }; diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc index 38c04aa3ef45a5..f16d29c0089ac5 100644 --- a/chrome/browser/history/visit_database_unittest.cc +++ b/chrome/browser/history/visit_database_unittest.cc @@ -4,8 +4,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/browser/history/url_database.h" #include "chrome/browser/history/visit_database.h" @@ -63,7 +63,7 @@ class VisitDatabaseTest : public PlatformTest, return db_; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; }; diff --git a/chrome/browser/importer/firefox_importer_utils_unittest.cc b/chrome/browser/importer/firefox_importer_utils_unittest.cc index 8f79908e917064..914a4b77311652 100644 --- a/chrome/browser/importer/firefox_importer_utils_unittest.cc +++ b/chrome/browser/importer/firefox_importer_utils_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/importer/firefox_importer_utils.h" #include "grit/generated_resources.h" #include "testing/gtest/include/gtest/gtest.h" @@ -100,7 +100,7 @@ TEST(FirefoxImporterUtilsTest, GetPrefsJsValue) { } TEST(FirefoxImporterUtilsTest, GetFirefoxImporterName) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath app_ini_file(temp_dir.path().AppendASCII("application.ini")); for (size_t i = 0; i < arraysize(GetFirefoxImporterNameCases); ++i) { diff --git a/chrome/browser/importer/firefox_profile_lock_unittest.cc b/chrome/browser/importer/firefox_profile_lock_unittest.cc index 7524aa53980cd0..a9a22573e3f511 100644 --- a/chrome/browser/importer/firefox_profile_lock_unittest.cc +++ b/chrome/browser/importer/firefox_profile_lock_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "build/build_config.h" #include "chrome/browser/importer/firefox_profile_lock.h" @@ -18,7 +18,7 @@ class FirefoxProfileLockTest : public testing::Test { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; TEST_F(FirefoxProfileLockTest, LockTest) { diff --git a/chrome/browser/importer/importer_unittest_utils.h b/chrome/browser/importer/importer_unittest_utils.h index a809c5a7b6b289..3b054a8eb26236 100644 --- a/chrome/browser/importer/importer_unittest_utils.h +++ b/chrome/browser/importer/importer_unittest_utils.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ #define CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/importer/profile_writer.h" #include "content/public/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -46,7 +46,7 @@ class ImporterTest : public testing::Test { protected: virtual void SetUp() OVERRIDE; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr profile_; private: diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm index 9515859738abc5..ff29c6d3ee5611 100644 --- a/chrome/browser/importer/safari_importer_unittest.mm +++ b/chrome/browser/importer/safari_importer_unittest.mm @@ -7,8 +7,8 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" @@ -193,7 +193,7 @@ FilePath GetTestSafariLibraryPath() { EXPECT_EQ(items & importer::HOME_PAGE, importer::NONE); // Check that we don't import anything from a bogus library directory. - ScopedTempDir fake_library_dir; + base::ScopedTempDir fake_library_dir; ASSERT_TRUE(fake_library_dir.CreateUniqueTempDir()); EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir.path(), &items)); } diff --git a/chrome/browser/intents/web_intents_registry_unittest.cc b/chrome/browser/intents/web_intents_registry_unittest.cc index bb031276e02a63..c9f1e3c945a6ec 100644 --- a/chrome/browser/intents/web_intents_registry_unittest.cc +++ b/chrome/browser/intents/web_intents_registry_unittest.cc @@ -4,10 +4,10 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/synchronization/waitable_event.h" #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/test_extension_service.h" @@ -134,7 +134,7 @@ class WebIntentsRegistryTest : public testing::Test { MockExtensionService extension_service_; ExtensionSet extensions_; WebIntentsRegistry registry_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; // Base consumer for WebIntentsRegistry results. diff --git a/chrome/browser/media_gallery/media_gallery_database_unittest.cc b/chrome/browser/media_gallery/media_gallery_database_unittest.cc index c16e8466f2f978..e78e9fc62d7842 100644 --- a/chrome/browser/media_gallery/media_gallery_database_unittest.cc +++ b/chrome/browser/media_gallery/media_gallery_database_unittest.cc @@ -5,7 +5,7 @@ #include #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/browser/media_gallery/media_gallery_database.h" #include "chrome/browser/media_gallery/media_gallery_database_types.h" #include "sql/connection.h" @@ -39,7 +39,7 @@ class MediaGalleryDatabaseTest : public testing::Test, db_.Close(); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; }; diff --git a/chrome/browser/net/sqlite_persistent_cookie_store_perftest.cc b/chrome/browser/net/sqlite_persistent_cookie_store_perftest.cc index 6fea67d4247423..b03a14ca882f45 100644 --- a/chrome/browser/net/sqlite_persistent_cookie_store_perftest.cc +++ b/chrome/browser/net/sqlite_persistent_cookie_store_perftest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/perftimer.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/synchronization/waitable_event.h" #include "base/test/thread_test_helper.h" @@ -86,7 +86,7 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { base::WaitableEvent loaded_event_; base::WaitableEvent key_loaded_event_; std::vector cookies_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr store_; }; diff --git a/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc b/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc index 1b3be2e7e43678..b35df3c8fb9e05 100644 --- a/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc +++ b/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc @@ -8,9 +8,9 @@ #include "base/bind.h" #include "base/callback.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/synchronization/waitable_event.h" #include "base/test/thread_test_helper.h" @@ -116,7 +116,7 @@ class SQLitePersistentCookieStoreTest : public testing::Test { base::WaitableEvent key_loaded_event_; base::WaitableEvent db_thread_event_; CanonicalCookieVector cookies_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr store_; }; diff --git a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc index b26f6424b046e0..6c62fe7695c98f 100644 --- a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc +++ b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc @@ -4,10 +4,10 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/test/thread_test_helper.h" #include "chrome/browser/net/clear_on_exit_policy.h" @@ -79,7 +79,7 @@ class SQLiteServerBoundCertStoreTest : public testing::Test { } content::TestBrowserThread db_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr store_; }; diff --git a/chrome/browser/net/transport_security_persister_unittest.cc b/chrome/browser/net/transport_security_persister_unittest.cc index 32ddfa2113f784..bb2f9188b4c327 100644 --- a/chrome/browser/net/transport_security_persister_unittest.cc +++ b/chrome/browser/net/transport_security_persister_unittest.cc @@ -10,8 +10,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "content/public/test/test_browser_thread.h" #include "net/base/transport_security_state.h" #include "testing/gtest/include/gtest/gtest.h" @@ -47,7 +47,7 @@ class TransportSecurityPersisterTest : public testing::Test { // TransportSecurityPersister runs on the IO thread. content::TestBrowserThread test_io_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; TransportSecurityState state_; scoped_ptr persister_; }; diff --git a/chrome/browser/page_cycler/page_cycler_browsertest.cc b/chrome/browser/page_cycler/page_cycler_browsertest.cc index 476ab5a998154c..a29bbdf394f9ee 100644 --- a/chrome/browser/page_cycler/page_cycler_browsertest.cc +++ b/chrome/browser/page_cycler/page_cycler_browsertest.cc @@ -179,13 +179,13 @@ class PageCyclerCachedBrowserTest : public PageCyclerBrowserTest { private: // The directory storing the copy of the UserDataDir. - ScopedTempDir user_data_dir_; + base::ScopedTempDir user_data_dir_; }; // Sanity check; iterate through a series of URLs and make sure there are no // errors. IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, BasicTest) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); @@ -212,7 +212,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, UnvisitableURL) { const size_t kNumErrors = 1; const char kFakeURL[] = "http://www.pleasenoonehavethisurlanytimeinthenext" "century.com/gibberish"; - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); @@ -247,7 +247,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, UnvisitableURL) { IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, InvalidURL) { const char kBadURL[] = "notarealurl"; - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); @@ -279,7 +279,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, InvalidURL) { // Test that PageCycler will remove a Chrome Error URL prior to running. IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, ChromeErrorURL) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); @@ -327,7 +327,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, ChromeErrorURL) { #define MAYBE_PlaybackMode PlaybackMode #endif IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_PlaybackMode) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); @@ -358,7 +358,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_PlaybackMode) { IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_URLNotInCache) { const char kCacheMissURL[] = "http://www.images.google.com/"; - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); RegisterForNotifications(); diff --git a/chrome/browser/page_cycler/page_cycler_unittest.cc b/chrome/browser/page_cycler/page_cycler_unittest.cc index 8751407e404627..52b2418d823ac8 100644 --- a/chrome/browser/page_cycler/page_cycler_unittest.cc +++ b/chrome/browser/page_cycler/page_cycler_unittest.cc @@ -198,7 +198,7 @@ TEST_F(PageCyclerTest, FailProvisionalLoads) { const FilePath errors_expected_file = test_data_dir().AppendASCII("errors_expected"); - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); InitFilePaths(temp.path()); @@ -264,7 +264,7 @@ TEST_F(PageCyclerTest, FailProvisionalLoads) { TEST_F(PageCyclerTest, StatsFile) { const int kNumLoads = 4; - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); InitFilePaths(temp.path()); @@ -292,7 +292,7 @@ TEST_F(PageCyclerTest, KillBrowserAndAbort) { const FilePath errors_expected_file = test_data_dir().AppendASCII("abort_expected"); - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); InitFilePaths(temp.path()); @@ -327,7 +327,7 @@ TEST_F(PageCyclerTest, KillBrowserAndAbort) { TEST_F(PageCyclerTest, MultipleIterations) { const int kNumLoads = 4; - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); InitFilePaths(temp.path()); diff --git a/chrome/browser/parsers/metadata_parser_filebase_unittest.cc b/chrome/browser/parsers/metadata_parser_filebase_unittest.cc index f407b3caf9a2e8..b8bd470cd1e866 100644 --- a/chrome/browser/parsers/metadata_parser_filebase_unittest.cc +++ b/chrome/browser/parsers/metadata_parser_filebase_unittest.cc @@ -7,7 +7,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_util.h" // TODO(brettw) remove when WideToASCII moves. #include "chrome/browser/parsers/metadata_parser_filebase.h" @@ -45,7 +45,7 @@ class FileMetaDataParserTest : public testing::Test { return base::Int64ToString(size); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath test_file_; }; diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc index c31376d9c7de44..18a403d12fcbad 100644 --- a/chrome/browser/password_manager/login_database_unittest.cc +++ b/chrome/browser/password_manager/login_database_unittest.cc @@ -6,8 +6,8 @@ #include "base/basictypes.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -25,7 +25,7 @@ class LoginDatabaseTest : public testing::Test { } FilePath file_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; TEST_F(LoginDatabaseTest, Logins) { diff --git a/chrome/browser/password_manager/password_store_mac_unittest.cc b/chrome/browser/password_manager/password_store_mac_unittest.cc index 1a689ce4f5ce85..b413193b67742b 100644 --- a/chrome/browser/password_manager/password_store_mac_unittest.cc +++ b/chrome/browser/password_manager/password_store_mac_unittest.cc @@ -7,8 +7,8 @@ #include "base/basictypes.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -926,7 +926,7 @@ class PasswordStoreMacTest : public testing::Test { MockAppleKeychain* keychain_; // Owned by store_. LoginDatabase* login_db_; // Owned by store_. scoped_refptr store_; - ScopedTempDir db_dir_; + base::ScopedTempDir db_dir_; }; TEST_F(PasswordStoreMacTest, TestStoreUpdate) { diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc index e75861fe7d77e5..02563f8e58f94a 100644 --- a/chrome/browser/password_manager/password_store_win_unittest.cc +++ b/chrome/browser/password_manager/password_store_win_unittest.cc @@ -3,15 +3,15 @@ // found in the LICENSE file. #include +#include #include #include -#include #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/synchronization/waitable_event.h" #include "base/time.h" @@ -140,7 +140,7 @@ class PasswordStoreWinTest : public testing::Test { scoped_ptr profile_; scoped_refptr wds_; scoped_refptr store_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; ACTION(STLDeleteElements0) { diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc index 55d2d3c5a40be8..bbb9aa29a54431 100644 --- a/chrome/browser/password_manager/password_store_x_unittest.cc +++ b/chrome/browser/password_manager/password_store_x_unittest.cc @@ -6,8 +6,8 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -298,7 +298,7 @@ class PasswordStoreXTest : public testing::TestWithParam { scoped_ptr login_db_; scoped_ptr profile_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; ACTION(STLDeleteElements0) { diff --git a/chrome/browser/performance_monitor/database_unittest.cc b/chrome/browser/performance_monitor/database_unittest.cc index f95ecfd7a7e336..e6826939e02a66 100644 --- a/chrome/browser/performance_monitor/database_unittest.cc +++ b/chrome/browser/performance_monitor/database_unittest.cc @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "chrome/browser/performance_monitor/database.h" #include "chrome/browser/performance_monitor/key_builder.h" @@ -120,7 +120,7 @@ class PerformanceMonitorDatabaseEventTest : public ::testing::Test { scoped_ptr db_; Database::Clock* clock_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr install_event_1_; scoped_ptr install_event_2_; scoped_ptr uninstall_event_1_; @@ -180,13 +180,13 @@ class PerformanceMonitorDatabaseMetricTest : public ::testing::Test { scoped_ptr db_; Database::Clock* clock_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; std::string activity_; }; ////// PerformanceMonitorDatabaseSetupTests //////////////////////////////////// TEST(PerformanceMonitorDatabaseSetupTest, OpenClose) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_ptr db = Database::Create(temp_dir.path()); ASSERT_TRUE(db.get()); @@ -195,7 +195,7 @@ TEST(PerformanceMonitorDatabaseSetupTest, OpenClose) { } TEST(PerformanceMonitorDatabaseSetupTest, ActiveInterval) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); TestingClock* clock_1 = new TestingClock(); @@ -235,7 +235,7 @@ TEST(PerformanceMonitorDatabaseSetupTest, ActiveInterval) { TEST(PerformanceMonitorDatabaseSetupTest, ActiveIntervalRetrievalDuringActiveInterval) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); TestingClock* clock = new TestingClock(); @@ -256,7 +256,7 @@ TEST(PerformanceMonitorDatabaseSetupTest, TEST(PerformanceMonitorDatabaseSetupTest, ActiveIntervalRetrievalAfterActiveInterval) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); TestingClock* clock = new TestingClock(); @@ -396,7 +396,7 @@ TEST_F(PerformanceMonitorDatabaseMetricTest, GetRecentMetric) { ASSERT_TRUE(db_->GetRecentStatsForActivityAndMetric(METRIC_CPU_USAGE, &stat)); EXPECT_EQ(50.5, stat.value); - ScopedTempDir dir; + base::ScopedTempDir dir; CHECK(dir.CreateUniqueTempDir()); scoped_ptr db = Database::Create(dir.path()); CHECK(db.get()); diff --git a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc index 2ddf6c327e45e6..d5b3a353b5b072 100644 --- a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc +++ b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc @@ -267,7 +267,7 @@ class PerformanceMonitorBrowserTest : public ExtensionBrowserTest { } protected: - ScopedTempDir db_dir_; + base::ScopedTempDir db_dir_; PerformanceMonitor* performance_monitor_; }; @@ -434,7 +434,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceMonitorBrowserTest, // Test that PerformanceMonitor correctly records an extension update event. IN_PROC_BROWSER_TEST_F(PerformanceMonitorBrowserTest, UpdateExtensionEvent) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath test_data_dir; diff --git a/chrome/browser/policy/cloud_policy_controller_unittest.cc b/chrome/browser/policy/cloud_policy_controller_unittest.cc index c96017ca572465..e752bc9b7b9dcd 100644 --- a/chrome/browser/policy/cloud_policy_controller_unittest.cc +++ b/chrome/browser/policy/cloud_policy_controller_unittest.cc @@ -4,9 +4,9 @@ #include "chrome/browser/policy/cloud_policy_controller.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/policy/cloud_policy_data_store.h" #include "chrome/browser/policy/device_token_fetcher.h" #include "chrome/browser/policy/logging_work_scheduler.h" @@ -117,7 +117,7 @@ class CloudPolicyControllerTest : public testing::Test { scoped_ptr data_store_; MockDeviceManagementService service_; PolicyNotifier notifier_; - ScopedTempDir temp_user_data_dir_; + base::ScopedTempDir temp_user_data_dir_; MessageLoop loop_; em::DeviceManagementResponse spdy_policy_response_; diff --git a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc index 18e3927c61c845..ed9ad2b5be6537 100644 --- a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc +++ b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc @@ -4,10 +4,10 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/cloud_policy_data_store.h" @@ -245,7 +245,7 @@ class CloudPolicySubsystemTestBase : public testing::Test { << "No enough requests were fired during the test run."; } - ScopedTempDir temp_user_data_dir_; + base::ScopedTempDir temp_user_data_dir_; MessageLoop loop_; content::TestBrowserThread ui_thread_; diff --git a/chrome/browser/policy/config_dir_policy_loader_unittest.cc b/chrome/browser/policy/config_dir_policy_loader_unittest.cc index a2e7b9149a9c70..efe6f4ef7d6495 100644 --- a/chrome/browser/policy/config_dir_policy_loader_unittest.cc +++ b/chrome/browser/policy/config_dir_policy_loader_unittest.cc @@ -4,9 +4,9 @@ #include "base/compiler_specific.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_string_value_serializer.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/values.h" #include "chrome/browser/policy/async_policy_provider.h" @@ -61,7 +61,7 @@ class TestHarness : public PolicyProviderTestHarness { static PolicyProviderTestHarness* Create(); private: - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; int next_policy_file_index_; DISALLOW_COPY_AND_ASSIGN(TestHarness); diff --git a/chrome/browser/policy/cros_user_policy_cache_unittest.cc b/chrome/browser/policy/cros_user_policy_cache_unittest.cc index 1e6706bba14b13..316955ce4e9add 100644 --- a/chrome/browser/policy/cros_user_policy_cache_unittest.cc +++ b/chrome/browser/policy/cros_user_policy_cache_unittest.cc @@ -5,9 +5,9 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "chrome/browser/policy/cloud_policy_data_store.h" #include "chrome/browser/policy/cros_user_policy_cache.h" @@ -100,7 +100,7 @@ class CrosUserPolicyCacheTest : public testing::Test { private: content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; DISALLOW_COPY_AND_ASSIGN(CrosUserPolicyCacheTest); }; diff --git a/chrome/browser/policy/device_token_fetcher_unittest.cc b/chrome/browser/policy/device_token_fetcher_unittest.cc index a4247518ce60d9..56b857d108021d 100644 --- a/chrome/browser/policy/device_token_fetcher_unittest.cc +++ b/chrome/browser/policy/device_token_fetcher_unittest.cc @@ -4,8 +4,8 @@ #include "chrome/browser/policy/device_token_fetcher.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/policy/cloud_policy_data_store.h" #include "chrome/browser/policy/logging_work_scheduler.h" #include "chrome/browser/policy/mock_cloud_policy_data_store.h" @@ -96,7 +96,7 @@ class DeviceTokenFetcherTest : public testing::Test { scoped_ptr data_store_; MockCloudPolicyDataStoreObserver observer_; PolicyNotifier notifier_; - ScopedTempDir temp_user_data_dir_; + base::ScopedTempDir temp_user_data_dir_; em::DeviceManagementResponse successful_registration_response_; private: diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 6735006de4eacd..e2a1b67f0e4f3d 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -11,9 +11,9 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/stringprintf.h" #include "base/test/test_file_util.h" @@ -1043,7 +1043,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DownloadDirectory) { // Verifies that the download directory can be forced by policy. // Set the initial download directory. - ScopedTempDir initial_dir; + base::ScopedTempDir initial_dir; ASSERT_TRUE(initial_dir.CreateUniqueTempDir()); browser()->profile()->GetPrefs()->SetFilePath( prefs::kDownloadDefaultDirectory, initial_dir.path()); @@ -1057,7 +1057,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DownloadDirectory) { file_util::DieFileDie(initial_dir.path().Append(file), false); // Override the download directory with the policy and verify a download. - ScopedTempDir forced_dir; + base::ScopedTempDir forced_dir; ASSERT_TRUE(forced_dir.CreateUniqueTempDir()); PolicyMap policies; policies.Set(key::kDownloadDirectory, POLICY_LEVEL_MANDATORY, diff --git a/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc b/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc index d1a5884b3d908c..aba7eb0d7f679c 100644 --- a/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc +++ b/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc @@ -5,9 +5,9 @@ #include "chrome/browser/policy/user_cloud_policy_store_chromeos.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/chromeos/login/mock_user_manager.h" #include "chrome/browser/policy/cloud_policy_constants.h" #include "chrome/browser/policy/policy_builder.h" @@ -124,7 +124,7 @@ class UserCloudPolicyStoreChromeOSTest : public testing::Test { private: content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; chromeos::ScopedMockUserManagerEnabler user_manager_; DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOSTest); diff --git a/chrome/browser/policy/user_cloud_policy_store_unittest.cc b/chrome/browser/policy/user_cloud_policy_store_unittest.cc index 87c8939d659d7f..72c2f19cc57b98 100644 --- a/chrome/browser/policy/user_cloud_policy_store_unittest.cc +++ b/chrome/browser/policy/user_cloud_policy_store_unittest.cc @@ -5,9 +5,9 @@ #include "chrome/browser/policy/user_cloud_policy_store.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/run_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/policy/policy_builder.h" #include "chrome/browser/signin/signin_manager.h" #include "chrome/browser/signin/signin_manager_factory.h" @@ -103,7 +103,7 @@ class UserCloudPolicyStoreTest : public testing::Test { content::TestBrowserThread file_thread_; scoped_ptr profile_; - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreTest); }; diff --git a/chrome/browser/policy/user_policy_cache_unittest.cc b/chrome/browser/policy/user_policy_cache_unittest.cc index 36d12f641259d7..7d04bd1d3743ad 100644 --- a/chrome/browser/policy/user_policy_cache_unittest.cc +++ b/chrome/browser/policy/user_policy_cache_unittest.cc @@ -8,8 +8,8 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/browser/policy/proto/cloud_policy.pb.h" #include "chrome/browser/policy/proto/device_management_backend.pb.h" @@ -128,7 +128,7 @@ class UserPolicyCacheTest : public testing::Test { MockCloudPolicyCacheBaseObserver observer_; private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; }; diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc index 0054fa566065eb..429f4ae2fcd61f 100644 --- a/chrome/browser/prefs/pref_service_browsertest.cc +++ b/chrome/browser/prefs/pref_service_browsertest.cc @@ -6,9 +6,9 @@ #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_file_util.h" #include "base/values.h" #include "build/build_config.h" diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc index 883f50a536d19e..29fa1dd3251a24 100644 --- a/chrome/browser/prefs/pref_service_unittest.cc +++ b/chrome/browser/prefs/pref_service_unittest.cc @@ -6,12 +6,12 @@ #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/prefs/json_pref_store.h" #include "base/prefs/public/pref_change_registrar.h" #include "base/prefs/testing_pref_store.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/policy/configuration_policy_pref_store.h" @@ -301,7 +301,7 @@ class PrefServiceUserFilePrefsTest : public testing::Test { } // The path to temporary directory used to contain the test operations. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // The path to the directory where the test data is stored. FilePath data_dir_; // A message loop that we can use as the file thread message loop. diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc index 9020450b535c71..b88c8fb8d5873e 100644 --- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc +++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc @@ -319,7 +319,7 @@ class CloudPrintProxyPolicyStartupTest : public base::MultiProcessTest, scoped_ptr startup_channel_; #if defined(OS_MACOSX) - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath executable_path_, bundle_path_; scoped_ptr mock_launchd_; scoped_ptr scoped_launchd_instance_; diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h index 7dad9afc323725..2b03b2d0bcfaa4 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -29,7 +29,7 @@ #endif // defined(OS_POSIX) #if defined(OS_LINUX) || defined(OS_OPENBSD) -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #endif // defined(OS_LINUX) || defined(OS_OPENBSD) class CommandLine; @@ -204,7 +204,7 @@ class ProcessSingleton : public base::NonThreadSafe { FilePath cookie_path_; // Temporary directory to hold the socket. - ScopedTempDir socket_dir_; + base::ScopedTempDir socket_dir_; // Helper class for linux specific messages. LinuxWatcher is ref counted // because it posts messages between threads. diff --git a/chrome/browser/process_singleton_browsertest.cc b/chrome/browser/process_singleton_browsertest.cc index 55ac9624159d84..c0053fb55a7aaf 100644 --- a/chrome/browser/process_singleton_browsertest.cc +++ b/chrome/browser/process_singleton_browsertest.cc @@ -14,18 +14,18 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/synchronization/waitable_event.h" #include "base/test/test_timeouts.h" #include "base/threading/thread.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/base/test_launcher_utils.h" #include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/test_launcher_utils.h" namespace { @@ -214,7 +214,7 @@ class ProcessSingletonTest : public InProcessBrowserTest { // We don't want to use the default profile, but can't use UITest's since we // don't use UITest::LaunchBrowser. - ScopedTempDir temp_profile_dir_; + base::ScopedTempDir temp_profile_dir_; }; #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) diff --git a/chrome/browser/process_singleton_linux_unittest.cc b/chrome/browser/process_singleton_linux_unittest.cc index 84ccc74af47abb..3bc0066fee8a99 100644 --- a/chrome/browser/process_singleton_linux_unittest.cc +++ b/chrome/browser/process_singleton_linux_unittest.cc @@ -4,19 +4,20 @@ #include "chrome/browser/process_singleton.h" +#include #include #include -#include #include -#include + #include +#include #include "base/bind.h" #include "base/command_line.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/synchronization/waitable_event.h" #include "base/test/test_timeouts.h" @@ -191,7 +192,7 @@ class ProcessSingletonLinuxTest : public testing::Test { } content::TestBrowserThread io_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; base::WaitableEvent wait_event_; base::WaitableEvent signal_event_; diff --git a/chrome/browser/process_singleton_mac_unittest.cc b/chrome/browser/process_singleton_mac_unittest.cc index 39451df96b52aa..639a3af5412818 100644 --- a/chrome/browser/process_singleton_mac_unittest.cc +++ b/chrome/browser/process_singleton_mac_unittest.cc @@ -61,7 +61,7 @@ class ProcessSingletonMacTest : public PlatformTest { return false; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath lock_path_; }; diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc index 9067afbb989169..efda9148cf42a8 100644 --- a/chrome/browser/profiles/profile_browsertest.cc +++ b/chrome/browser/profiles/profile_browsertest.cc @@ -5,8 +5,8 @@ #include "chrome/browser/profiles/profile.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/version.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/chrome_version_service.h" @@ -62,7 +62,7 @@ typedef InProcessBrowserTest ProfileBrowserTest; // Flaky (sometimes timeout): http://crbug.com/141141 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_CreateNewProfileSynchronous) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfileDelegate delegate; @@ -79,7 +79,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, // Flaky: http://crbug.com/141517 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_CreateOldProfileSynchronous) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CreatePrefsFileInDirectory(temp_dir.path()); @@ -97,7 +97,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, // This test is flaky on Linux, Win and Mac. See crbug.com/142787 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_CreateNewProfileAsynchronous) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfileDelegate delegate; @@ -120,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, // Flaky: http://crbug.com/141517 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_CreateOldProfileAsynchronous) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CreatePrefsFileInDirectory(temp_dir.path()); @@ -141,7 +141,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, // Test that a README file is created for profiles that didn't have it. // Flaky: http://crbug.com/140882 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_ProfileReadmeCreated) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfileDelegate delegate; @@ -169,7 +169,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_ProfileReadmeCreated) { // Test that Profile can be deleted before README file is created. IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, ProfileDeletedBeforeReadmeCreated) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfileDelegate delegate; @@ -191,7 +191,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, ProfileDeletedBeforeReadmeCreated) { // Test that repeated setting of exit type is handled correctly. IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, ExitType) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfileDelegate delegate; diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 0104271f09d5bf..9ff66f149af468 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -6,9 +6,9 @@ #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/system_monitor/system_monitor.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -131,7 +131,7 @@ class ProfileManagerTest : public testing::Test { #endif // The path to temporary directory used to contain the test operations. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; ScopedTestingLocalState local_state_; scoped_refptr extension_event_router_forwarder_; diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc index 2eb5821c3ddac7..2a3ca1b88b5c6a 100644 --- a/chrome/browser/rlz/rlz_unittest.cc +++ b/chrome/browser/rlz/rlz_unittest.cc @@ -4,9 +4,10 @@ #include "chrome/browser/rlz/rlz.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop.h" #include "base/stringprintf.h" +#include "base/message_loop.h" #include "base/path_service.h" #include "base/scoped_temp_dir.h" #include "base/threading/thread.h" @@ -19,8 +20,8 @@ #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_update_constants.h" #include "content/public/browser/navigation_entry.h" -#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "testing/gtest/include/gtest/gtest.h" @@ -197,8 +198,13 @@ class RlzLibTest : public testing::Test { TestRLZTracker tracker_; #if defined(OS_WIN) RegistryOverrideManager override_manager_; +<<<<<<< HEAD +#elif defined(OS_MACOSX) + base::ScopedTempDir temp_dir_; +======= #elif defined(OS_MACOSX) || defined(OS_CHROMEOS) ScopedTempDir temp_dir_; +>>>>>>> master scoped_ptr brand_override_; #endif #if defined(OS_CHROMEOS) diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc index e1052dfc1a9e52..fde46f19ad3372 100644 --- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc @@ -12,11 +12,11 @@ #include "base/callback.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" @@ -466,7 +466,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) { response.SerializeAsString(), true); - ScopedTempDir download_dir; + base::ScopedTempDir download_dir; ASSERT_TRUE(download_dir.CreateUniqueTempDir()); DownloadProtectionService::DownloadInfo info; @@ -477,7 +477,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) { // Write out a zip archive to the temporary file. In this case, it // only contains a text file. - ScopedTempDir zip_source_dir; + base::ScopedTempDir zip_source_dir; ASSERT_TRUE(zip_source_dir.CreateUniqueTempDir()); std::string file_contents = "dummy file"; ASSERT_EQ(static_cast(file_contents.size()), file_util::WriteFile( @@ -533,7 +533,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) { } TEST_F(DownloadProtectionServiceTest, CheckClientDownloadCorruptZip) { - ScopedTempDir download_dir; + base::ScopedTempDir download_dir; ASSERT_TRUE(download_dir.CreateUniqueTempDir()); DownloadProtectionService::DownloadInfo info; diff --git a/chrome/browser/safe_browsing/prefix_set_unittest.cc b/chrome/browser/safe_browsing/prefix_set_unittest.cc index 50e15caca5d228..d98909a607ce50 100644 --- a/chrome/browser/safe_browsing/prefix_set_unittest.cc +++ b/chrome/browser/safe_browsing/prefix_set_unittest.cc @@ -8,11 +8,11 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/md5.h" #include "base/memory/scoped_ptr.h" #include "base/rand_util.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -146,7 +146,7 @@ class PrefixSetTest : public PlatformTest { // Tests should not modify this shared resource. static std::vector shared_prefixes_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; std::vector PrefixSetTest::shared_prefixes_; diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 31cb3600681adb..d6815b32792eeb 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -5,9 +5,9 @@ // Unit tests for the SafeBrowsing storage system. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "chrome/browser/safe_browsing/safe_browsing_database.h" #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" @@ -267,7 +267,7 @@ class SafeBrowsingDatabaseTest : public PlatformTest { scoped_ptr database_; FilePath database_filename_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; // Tests retrieving list name information. diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc index 0723c9ddc9b926..3e431f64f8daa6 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc @@ -11,9 +11,9 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_split.h" #include "base/test/thread_test_helper.h" #include "chrome/browser/browser_process.h" @@ -432,7 +432,7 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest { // destructed until after the test Browser has been torn down, since the // ImportantFileWriter may still be modifying it after the Profile object has // been destroyed. - ScopedTempDir temp_profile_dir_; + base::ScopedTempDir temp_profile_dir_; // Waits for pending tasks on the IO thread to complete. This is useful // to wait for the SafeBrowsingService to finish loading/stopping. diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc index 3f0f97285b6275..150ea39a98cc66 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc @@ -5,8 +5,8 @@ #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/md5.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -44,7 +44,7 @@ class SafeBrowsingStoreFileTest : public PlatformTest { corruption_detected_ = true; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath filename_; scoped_ptr store_; bool corruption_detected_; diff --git a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc index 324af6e2bed86e..d23e108a1ae908 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc @@ -3,13 +3,13 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_vector.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/browser/search_engines/search_terms_data.h" #include "chrome/browser/search_engines/template_url.h" -#include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_prepopulate_data.h" +#include "chrome/browser/search_engines/template_url_service.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc index 32d3bf567442f0..5b9866a6056007 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -5,9 +5,9 @@ #include "chrome/browser/search_engines/template_url_service_test_util.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" #include "chrome/browser/google/google_url_tracker.h" @@ -70,7 +70,7 @@ class TemplateURLServiceTestingProfile : public TestingProfile { private: scoped_refptr service_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; content::TestBrowserThread db_thread_; content::TestBrowserThread io_thread_; }; diff --git a/chrome/browser/sessions/session_backend_unittest.cc b/chrome/browser/sessions/session_backend_unittest.cc index 27237b33c8daa4..02d9e8bdb0e27f 100644 --- a/chrome/browser/sessions/session_backend_unittest.cc +++ b/chrome/browser/sessions/session_backend_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_util.h" #include "chrome/browser/sessions/session_backend.h" @@ -47,7 +47,7 @@ class SessionBackendTest : public testing::Test { // Path used in testing. FilePath path_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; TEST_F(SessionBackendTest, SimpleReadWrite) { diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc index dd33e123c19056..cfc6bdbb4af4da 100644 --- a/chrome/browser/sessions/session_service_unittest.cc +++ b/chrome/browser/sessions/session_service_unittest.cc @@ -5,10 +5,10 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "base/time.h" @@ -166,7 +166,7 @@ class SessionServiceTest : public BrowserWithTestWindowTest, int sync_save_count_; // Path used in testing. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath path_; SessionServiceTestHelper helper_; diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index 9bde5da36b300c..0dc07fee78854d 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -19,12 +19,12 @@ #include "base/environment.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/file_util_icu.h" #include "base/message_loop.h" #include "base/path_service.h" #include "base/posix/eintr_wrapper.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_tokenizer.h" #include "base/threading/thread.h" @@ -76,7 +76,7 @@ std::string CreateShortcutIcon( return std::string(); // TODO(phajdan.jr): Report errors from this function, possibly as infobars. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; if (!temp_dir.CreateUniqueTempDir()) return std::string(); @@ -161,7 +161,7 @@ void DeleteShortcutOnDesktop(const FilePath& shortcut_filename) { bool CreateShortcutInApplicationsMenu(const FilePath& shortcut_filename, const std::string& contents) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; if (!temp_dir.CreateUniqueTempDir()) return false; diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index f5b2db0c4c4b4a..f344cfc09e0397 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -84,7 +84,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { content::TestBrowserThread file_thread(BrowserThread::FILE, &message_loop); { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockEnvironment env; @@ -99,7 +99,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { } { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockEnvironment env; @@ -117,7 +117,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { } { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockEnvironment env; diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc index 249ca1b8ac3680..a3e66d31d118c9 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc @@ -4,10 +4,9 @@ #include -#include "base/scoped_temp_dir.h" +#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_service.h" -#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" #include "chrome/common/spellcheck_common.h" #include "chrome/test/base/testing_profile.h" #include "content/public/test/test_browser_thread.h" diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc index 5fbbc112560430..18491d852cd983 100644 --- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc @@ -4,10 +4,10 @@ #include -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" +#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_service.h" -#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" #include "chrome/common/spellcheck_common.h" #include "chrome/test/base/testing_profile.h" #include "content/public/test/test_browser_thread.h" diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index dfb6cf135f1ab1..40ec0704f54db8 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -728,7 +728,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestBadHTTPSDownload) { GURL url_non_dangerous = test_server()->GetURL(""); GURL url_dangerous = https_server_expired_.GetURL( "files/downloads/dangerous/dangerous.exe"); - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; // Need empty temp dir to avoid having Chrome ask us for a new filename // when we've downloaded dangerous.exe one hundred times. diff --git a/chrome/browser/sync/credential_cache_service_win_unittest.cc b/chrome/browser/sync/credential_cache_service_win_unittest.cc index 60b7ab75dd722c..4959524c46d576 100644 --- a/chrome/browser/sync/credential_cache_service_win_unittest.cc +++ b/chrome/browser/sync/credential_cache_service_win_unittest.cc @@ -4,10 +4,10 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "base/values.h" #include "chrome/browser/sync/credential_cache_service_win.h" @@ -41,7 +41,7 @@ class CredentialCacheServiceTest : public CredentialCacheService, } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoop file_message_loop_; DISALLOW_COPY_AND_ASSIGN(CredentialCacheServiceTest); }; diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc index 9b6adbdc303d51..527386c71000ff 100644 --- a/chrome/browser/sync/profile_sync_service_session_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc @@ -9,10 +9,10 @@ #include "base/bind_helpers.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/location.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/time.h" #include "chrome/browser/sessions/session_types_test_helper.h" @@ -261,7 +261,7 @@ class ProfileSyncServiceSessionTest content::TestBrowserThread io_thread_; // Path used in testing. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; SessionModelAssociator* model_associator_; SessionChangeProcessor* change_processor_; SessionID window_id_; diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc index cbf4e53ec04b30..efbe7cf0840c2d 100644 --- a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc +++ b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc @@ -158,7 +158,7 @@ class DriveFileSyncServiceTest : public testing::Test { private: MessageLoop message_loop_; - ScopedTempDir base_dir_; + base::ScopedTempDir base_dir_; TestingProfile profile_; scoped_ptr sync_service_; diff --git a/chrome/browser/sync_file_system/drive_metadata_store_unittest.cc b/chrome/browser/sync_file_system/drive_metadata_store_unittest.cc index 93ba568f5166c5..c4f13a986f9c95 100644 --- a/chrome/browser/sync_file_system/drive_metadata_store_unittest.cc +++ b/chrome/browser/sync_file_system/drive_metadata_store_unittest.cc @@ -5,8 +5,8 @@ #include "chrome/browser/sync_file_system/drive_metadata_store.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h" #include "base/threading/thread.h" @@ -184,7 +184,7 @@ class DriveMetadataStoreTest : public testing::Test { message_loop_.Quit(); } - ScopedTempDir base_dir_; + base::ScopedTempDir base_dir_; MessageLoop message_loop_; scoped_ptr file_thread_; diff --git a/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc index 994b4b24bd7d33..de7e0e2257d916 100644 --- a/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc +++ b/chrome/browser/sync_file_system/local_file_sync_service_unittest.cc @@ -204,7 +204,7 @@ class LocalFileSyncServiceTest MultiThreadTestHelper thread_helper_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr file_system_; scoped_ptr local_service_; diff --git a/chrome/browser/system_monitor/media_device_notifications_utils_unittest.cc b/chrome/browser/system_monitor/media_device_notifications_utils_unittest.cc index 389f157a90548f..2a0470ea75dfcc 100644 --- a/chrome/browser/system_monitor/media_device_notifications_utils_unittest.cc +++ b/chrome/browser/system_monitor/media_device_notifications_utils_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/system_monitor/removable_device_constants.h" #include "content/public/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -70,7 +70,7 @@ class MediaDeviceNotificationUtilsTest : public testing::Test { private: content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; }; // Test to verify that IsMediaDevice() function returns true for the given diff --git a/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc index 5e9ebc2e675a4c..d16a4f9e84ebcf 100644 --- a/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc +++ b/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc @@ -7,10 +7,10 @@ #include "chrome/browser/system_monitor/removable_device_notifications_chromeos.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/system_monitor/system_monitor.h" #include "base/test/mock_devices_changed_observer.h" #include "base/utf_string_conversions.h" @@ -103,7 +103,7 @@ class RemovableDeviceNotificationsCrosTest : public testing::Test { content::TestBrowserThread file_thread_; // Temporary directory for created test data. - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; // Objects that talks with RemovableDeviceNotificationsCros. base::SystemMonitor system_monitor_; diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc index a598f62aa905bd..74c07d0e2b7a44 100644 --- a/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc +++ b/chrome/browser/system_monitor/removable_device_notifications_linux_unittest.cc @@ -12,10 +12,10 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/system_monitor/system_monitor.h" #include "base/test/mock_devices_changed_observer.h" #include "base/utf_string_conversions.h" @@ -323,7 +323,7 @@ class RemovableDeviceNotificationLinuxTest : public testing::Test { scoped_ptr mock_devices_changed_observer_; // Temporary directory for created test data. - ScopedTempDir scoped_temp_dir_; + base::ScopedTempDir scoped_temp_dir_; // Path to the test mtab file. FilePath mtab_file_; diff --git a/chrome/browser/system_monitor/removable_device_notifications_mac_unittest.mm b/chrome/browser/system_monitor/removable_device_notifications_mac_unittest.mm index b7c9e8d9b57552..7adcc1cb95cfb8 100644 --- a/chrome/browser/system_monitor/removable_device_notifications_mac_unittest.mm +++ b/chrome/browser/system_monitor/removable_device_notifications_mac_unittest.mm @@ -5,9 +5,9 @@ #include "chrome/browser/system_monitor/removable_device_notifications_mac.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/mac/foundation_util.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "base/system_monitor/system_monitor.h" #include "base/test/mock_devices_changed_observer.h" @@ -138,7 +138,7 @@ virtual void SetUp() OVERRIDE { } TEST_F(RemovableDeviceNotificationsMacTest, DCIM) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); file_util::CreateDirectory(temp_dir.path().Append(kDCIMDirectoryName)); diff --git a/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc index 7288899df4cadb..6c26f8f9e100a2 100644 --- a/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc +++ b/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc @@ -10,10 +10,10 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/system_monitor/system_monitor.h" #include "base/test/mock_devices_changed_observer.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc index 1514fcf52de6e5..0021214850a316 100644 --- a/chrome/browser/themes/browser_theme_pack_unittest.cc +++ b/chrome/browser/themes/browser_theme_pack_unittest.cc @@ -5,11 +5,11 @@ #include "chrome/browser/themes/browser_theme_pack.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/json/json_reader.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/common/chrome_paths.h" @@ -393,7 +393,7 @@ TEST_F(BrowserThemePackTest, TestNonExistantImages) { // the extension data, but for now, exists so valgrind can test some of the // tricky memory stuff that BrowserThemePack does. TEST_F(BrowserThemePackTest, CanBuildAndReadPack) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath file = dir.path().AppendASCII("data.pak"); diff --git a/chrome/browser/thumbnails/thumbnail_service_unittest.cc b/chrome/browser/thumbnails/thumbnail_service_unittest.cc index 3ab95572bf4fb8..e2b61631a6e5b8 100644 --- a/chrome/browser/thumbnails/thumbnail_service_unittest.cc +++ b/chrome/browser/thumbnails/thumbnail_service_unittest.cc @@ -76,7 +76,7 @@ TEST_F(ThumbnailServiceTest, ShouldUpdateThumbnail) { const GURL kBadURL("chrome://newtab"); // Set up the mock profile along with mock top sites. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); MockProfile profile; diff --git a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc index 2553f4575bfb30..44c5d28b17a719 100644 --- a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc +++ b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc @@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, Persist) { // Sanity check that bookmarks from different profiles are separate. // DISABLED_ because it regularly times out: http://crbug.com/159002. IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, DISABLED_MultiProfile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); BookmarkModel* bookmark_model1 = WaitForBookmarkModel(browser()->profile()); diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index 74401f7ecc4988..ed9321a93e3bd4 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -1620,7 +1620,7 @@ class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; IN_PROC_BROWSER_TEST_F(LaunchBrowserWithNonAsciiUserDatadir, diff --git a/chrome/browser/ui/browser_close_browsertest.cc b/chrome/browser/ui/browser_close_browsertest.cc index 7b8c7a9ccde42c..94351a2eef68af 100644 --- a/chrome/browser/ui/browser_close_browsertest.cc +++ b/chrome/browser/ui/browser_close_browsertest.cc @@ -378,9 +378,9 @@ class BrowserCloseTest : public InProcessBrowserTest { Profile* first_profile_; Profile* second_profile_; - ScopedTempDir first_profile_downloads_dir_; - ScopedTempDir second_profile_data_dir_; - ScopedTempDir second_profile_downloads_dir_; + base::ScopedTempDir first_profile_downloads_dir_; + base::ScopedTempDir second_profile_data_dir_; + base::ScopedTempDir second_profile_downloads_dir_; }; const BrowserCloseTest::DownloadsCloseCheckCase diff --git a/chrome/browser/ui/intents/web_intents_model_unittest.cc b/chrome/browser/ui/intents/web_intents_model_unittest.cc index 229e13b2db8df6..fe84c101a65193 100644 --- a/chrome/browser/ui/intents/web_intents_model_unittest.cc +++ b/chrome/browser/ui/intents/web_intents_model_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/synchronization/waitable_event.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -77,7 +77,7 @@ class WebIntentsModelTest : public testing::Test { content::TestBrowserThread db_thread_; scoped_refptr wds_; WebIntentsRegistry registry_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; class WaitingWebIntentsObserver : public WebIntentsModel::Observer { diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc index f47e926cc6beca..dc1c311308b469 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc @@ -5,10 +5,10 @@ #include "chrome/browser/ui/views/select_file_dialog_extension.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" // ASCIIToUTF16 #include "build/build_config.h" @@ -203,7 +203,7 @@ class SelectFileDialogExtensionBrowserTest : public ExtensionBrowserTest { scoped_ptr second_listener_; scoped_refptr second_dialog_; - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; FilePath downloads_dir_; }; diff --git a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc index 7f43a0731a9ee6..e2f3daa60a7d1b 100644 --- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc +++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/auto_reset.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_reader.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" @@ -127,7 +127,7 @@ class DownloadsDOMHandlerTest : public InProcessBrowserTest { } private: - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandlerTest); }; diff --git a/chrome/browser/ui/webui/feedback_ui_unittest.cc b/chrome/browser/ui/webui/feedback_ui_unittest.cc index 440e71ac53a232..bf848e6aa154be 100644 --- a/chrome/browser/ui/webui/feedback_ui_unittest.cc +++ b/chrome/browser/ui/webui/feedback_ui_unittest.cc @@ -7,7 +7,7 @@ #include "chrome/browser/ui/webui/feedback_ui.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" // This macro helps avoid wrapped lines in the test structs. @@ -45,7 +45,7 @@ class FeedbackUITest : public testing::Test { ASSERT_NO_FATAL_FAILURE(CreateFile(filepath)); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; std::vector saved_screenshots_; private: diff --git a/chrome/browser/user_style_sheet_watcher_unittest.cc b/chrome/browser/user_style_sheet_watcher_unittest.cc index b030049fc0812e..3b342f127dc368 100644 --- a/chrome/browser/user_style_sheet_watcher_unittest.cc +++ b/chrome/browser/user_style_sheet_watcher_unittest.cc @@ -7,8 +7,8 @@ #include "base/base64.h" #include "base/basictypes.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/threading/thread.h" #include "chrome/test/base/testing_browser_process.h" @@ -18,7 +18,7 @@ using content::BrowserThread; TEST(UserStyleSheetWatcherTest, StyleLoad) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); std::string css_file_contents = "a { color: green; }"; diff --git a/chrome/browser/value_store/value_store_frontend_unittest.cc b/chrome/browser/value_store/value_store_frontend_unittest.cc index efec3ed104f3ac..98b396a8943a1e 100644 --- a/chrome/browser/value_store/value_store_frontend_unittest.cc +++ b/chrome/browser/value_store/value_store_frontend_unittest.cc @@ -3,10 +3,10 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/value_store/value_store_frontend.h" #include "chrome/common/chrome_paths.h" #include "content/public/test/test_browser_thread.h" @@ -60,7 +60,7 @@ class ValueStoreFrontendTest : public testing::Test { } scoped_ptr storage_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath db_path_; MessageLoop message_loop_; content::TestBrowserThread ui_thread_; diff --git a/chrome/browser/value_store/value_store_unittest.h b/chrome/browser/value_store/value_store_unittest.h index d0bff4d298ad41..74b76eb6b5751d 100644 --- a/chrome/browser/value_store/value_store_unittest.h +++ b/chrome/browser/value_store/value_store_unittest.h @@ -7,10 +7,10 @@ #include "testing/gtest/include/gtest/gtest.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "chrome/browser/value_store/value_store.h" #include "chrome/test/base/testing_profile.h" #include "content/public/test/test_browser_thread.h" @@ -63,7 +63,7 @@ class ValueStoreTest : public testing::TestWithParam { scoped_ptr dict123_; private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Need these so that the DCHECKs for running on FILE or UI threads pass. MessageLoop message_loop_; diff --git a/chrome/browser/visitedlink/visitedlink_unittest.cc b/chrome/browser/visitedlink/visitedlink_unittest.cc index f27797424b9859..d13e988b4cd751 100644 --- a/chrome/browser/visitedlink/visitedlink_unittest.cc +++ b/chrome/browser/visitedlink/visitedlink_unittest.cc @@ -191,7 +191,7 @@ class VisitedLinkTest : public testing::Test { ClearDB(); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoop message_loop_; content::TestBrowserThread ui_thread_; diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm index 2ab85608fd6ec1..cdd342cf0c6715 100644 --- a/chrome/browser/web_applications/web_app_mac.mm +++ b/chrome/browser/web_applications/web_app_mac.mm @@ -7,11 +7,11 @@ #import #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/mac/bundle_locations.h" #include "base/mac/foundation_util.h" #include "base/mac/mac_util.h" #include "base/memory/scoped_nsobject.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/web_applications/web_app.h" @@ -98,7 +98,7 @@ bool AddBitmapImageRepToIconFamily(IconFamily* icon_family, bool WebAppShortcutCreator::CreateShortcut() { FilePath app_name = internals::GetSanitizedFileName(info_.title); FilePath app_file_name = app_name.ReplaceExtension("app"); - ScopedTempDir scoped_temp_dir; + base::ScopedTempDir scoped_temp_dir; if (!scoped_temp_dir.CreateUniqueTempDir()) return false; FilePath staging_path = scoped_temp_dir.path().Append(app_file_name); diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm index 997cb6db329566..6a7efd61303697 100644 --- a/chrome/browser/web_applications/web_app_mac_unittest.mm +++ b/chrome/browser/web_applications/web_app_mac_unittest.mm @@ -7,17 +7,17 @@ #import #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/mac/foundation_util.h" #include "base/memory/scoped_nsobject.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #include "chrome/common/mac/app_mode_common.h" #include "grit/theme_resources.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #import "testing/gtest_mac.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" @@ -57,7 +57,7 @@ explicit WebAppShortcutCreatorMock( // * WebAppShortcutCreator::CreateShortcut() opens a Finder window which it // shouldn't be doing when run from a unit test. TEST(WebAppShortcutCreatorTest, CreateShortcut) { - ScopedTempDir scoped_temp_dir; + base::ScopedTempDir scoped_temp_dir; EXPECT_TRUE(scoped_temp_dir.CreateUniqueTempDir()); FilePath dst_path = scoped_temp_dir.path().Append("a.app"); @@ -99,7 +99,7 @@ explicit WebAppShortcutCreatorMock( } TEST(WebAppShortcutCreatorTest, UpdateIcon) { - ScopedTempDir scoped_temp_dir; + base::ScopedTempDir scoped_temp_dir; ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir()); FilePath dst_path = scoped_temp_dir.path(); diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/chrome/browser/webdata/autofill_table_unittest.cc index 84f66939d7ddf1..367d4e105bc0f8 100644 --- a/chrome/browser/webdata/autofill_table_unittest.cc +++ b/chrome/browser/webdata/autofill_table_unittest.cc @@ -5,9 +5,9 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/guid.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -115,7 +115,7 @@ class AutofillTableTest : public testing::Test { } FilePath file_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; private: DISALLOW_COPY_AND_ASSIGN(AutofillTableTest); diff --git a/chrome/browser/webdata/keyword_table_unittest.cc b/chrome/browser/webdata/keyword_table_unittest.cc index 1583ed5e6b5320..012053001d3ab2 100644 --- a/chrome/browser/webdata/keyword_table_unittest.cc +++ b/chrome/browser/webdata/keyword_table_unittest.cc @@ -6,16 +6,16 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "chrome/common/chrome_paths.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/webdata/keyword_table.h" #include "chrome/browser/webdata/web_database.h" +#include "chrome/common/chrome_paths.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" @@ -34,7 +34,7 @@ class KeywordTableTest : public testing::Test { } FilePath file_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; private: DISALLOW_COPY_AND_ASSIGN(KeywordTableTest); diff --git a/chrome/browser/webdata/token_service_table_unittest.cc b/chrome/browser/webdata/token_service_table_unittest.cc index 1ea388c6ad14e3..c712261c99a578 100644 --- a/chrome/browser/webdata/token_service_table_unittest.cc +++ b/chrome/browser/webdata/token_service_table_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "chrome/browser/webdata/token_service_table.h" @@ -26,7 +26,7 @@ class TokenServiceTableTest : public testing::Test { } FilePath file_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; private: DISALLOW_COPY_AND_ASSIGN(TokenServiceTableTest); diff --git a/chrome/browser/webdata/web_apps_table_unittest.cc b/chrome/browser/webdata/web_apps_table_unittest.cc index 0b157f1d14a52f..8db136a105cee0 100644 --- a/chrome/browser/webdata/web_apps_table_unittest.cc +++ b/chrome/browser/webdata/web_apps_table_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "chrome/browser/webdata/web_apps_table.h" @@ -28,7 +28,7 @@ class WebAppsTableTest : public testing::Test { } FilePath file_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; private: DISALLOW_COPY_AND_ASSIGN(WebAppsTableTest); diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc index cc5c6f2124774a..b67d273e558dc6 100644 --- a/chrome/browser/webdata/web_data_service_unittest.cc +++ b/chrome/browser/webdata/web_data_service_unittest.cc @@ -6,11 +6,11 @@ #include #include "base/basictypes.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string16.h" #include "base/string_util.h" @@ -104,7 +104,7 @@ class WebDataServiceTest : public testing::Test { content::TestBrowserThread db_thread_; FilePath profile_dir_; scoped_refptr wds_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; class WebDataServiceAutofillTest : public WebDataServiceTest { diff --git a/chrome/browser/webdata/web_database_migration_unittest.cc b/chrome/browser/webdata/web_database_migration_unittest.cc index 4632244ddc6a98..5cca55b96936d6 100644 --- a/chrome/browser/webdata/web_database_migration_unittest.cc +++ b/chrome/browser/webdata/web_database_migration_unittest.cc @@ -5,9 +5,9 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/guid.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string16.h" #include "base/string_number_conversions.h" @@ -190,7 +190,7 @@ class WebDatabaseMigrationTest : public testing::Test { private: MessageLoopForUI message_loop_for_ui_; content::TestBrowserThread ui_thread_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; DISALLOW_COPY_AND_ASSIGN(WebDatabaseMigrationTest); }; diff --git a/chrome/browser/webdata/web_intents_table_unittest.cc b/chrome/browser/webdata/web_intents_table_unittest.cc index 77888ec13ff11c..5b3ffe18e97b88 100644 --- a/chrome/browser/webdata/web_intents_table_unittest.cc +++ b/chrome/browser/webdata/web_intents_table_unittest.cc @@ -7,7 +7,7 @@ #include #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/browser/intents/default_web_intent_service.h" @@ -73,7 +73,7 @@ class WebIntentsTableTest : public testing::Test { } WebDatabase db_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; // Test we can add, retrieve, and remove intent services from the database. diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index 7d857b51dffc0e..d6dea3fc44a7c4 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -9,11 +9,11 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" @@ -83,7 +83,7 @@ FilePath InstallExtension(const FilePath& unpacked_source_dir, // Get a temp directory on the same file system as the profile. FilePath install_temp_dir = GetInstallTempDir(extensions_dir); - ScopedTempDir extension_temp_dir; + base::ScopedTempDir extension_temp_dir; if (install_temp_dir.empty() || !extension_temp_dir.CreateUniqueTempDirUnderPath(install_temp_dir)) { LOG(ERROR) << "Creating of temp dir under in the profile failed."; diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc index 4e7f9ab45b043d..d445fce4e05787 100644 --- a/chrome/common/extensions/extension_file_util_unittest.cc +++ b/chrome/common/extensions/extension_file_util_unittest.cc @@ -5,9 +5,9 @@ #include "chrome/common/extensions/extension_file_util.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_string_value_serializer.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" @@ -27,7 +27,7 @@ namespace keys = extension_manifest_keys; #define InstallUninstallGarbageCollect DISABLED_InstallUninstallGarbageCollect #endif TEST(ExtensionFileUtil, InstallUninstallGarbageCollect) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); // Create a source extension. @@ -135,7 +135,7 @@ TEST(ExtensionFileUtil, LoadExtensionWithoutLocalesFolder) { DISABLED_CheckIllegalFilenamesNoUnderscores #endif TEST(ExtensionFileUtil, CheckIllegalFilenamesNoUnderscores) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().AppendASCII("some_dir"); @@ -155,7 +155,7 @@ TEST(ExtensionFileUtil, CheckIllegalFilenamesNoUnderscores) { DISABLED_CheckIllegalFilenamesOnlyReserved #endif TEST(ExtensionFileUtil, CheckIllegalFilenamesOnlyReserved) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -172,7 +172,7 @@ TEST(ExtensionFileUtil, CheckIllegalFilenamesOnlyReserved) { DISABLED_CheckIllegalFilenamesReservedAndIllegal #endif TEST(ExtensionFileUtil, CheckIllegalFilenamesReservedAndIllegal) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -382,7 +382,7 @@ static scoped_refptr LoadExtensionManifest( #define ValidateThemeUTF8 DISABLED_ValidateThemeUTF8 #endif TEST(ExtensionFileUtil, ValidateThemeUTF8) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); // "aeo" with accents. Use http://0xcc.net/jsescape/ to decode them. @@ -415,7 +415,7 @@ TEST(ExtensionFileUtil, ValidateThemeUTF8) { #define MAYBE_BackgroundScriptsMustExist BackgroundScriptsMustExist #endif TEST(ExtensionFileUtil, MAYBE_BackgroundScriptsMustExist) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); scoped_ptr value(new DictionaryValue()); @@ -478,7 +478,7 @@ const char private_key[] = "-----END PRIVATE KEY-----\n"; TEST(ExtensionFileUtil, FindPrivateKeyFiles) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().AppendASCII("some_dir"); @@ -504,7 +504,7 @@ TEST(ExtensionFileUtil, FindPrivateKeyFiles) { } TEST(ExtensionFileUtil, WarnOnPrivateKey) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath ext_path = temp.path().AppendASCII("ext_root"); diff --git a/chrome/common/extensions/extension_l10n_util_unittest.cc b/chrome/common/extensions/extension_l10n_util_unittest.cc index bee0478dd1eba9..32120297326dcb 100644 --- a/chrome/common/extensions/extension_l10n_util_unittest.cc +++ b/chrome/common/extensions/extension_l10n_util_unittest.cc @@ -4,15 +4,15 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_l10n_util.h" +#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/message_bundle.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" @@ -70,7 +70,7 @@ namespace { #endif TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -86,7 +86,7 @@ TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) { } TEST(ExtensionL10nUtil, GetValidLocalesWithValidLocaleNoMessagesFile) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -103,7 +103,7 @@ TEST(ExtensionL10nUtil, GetValidLocalesWithValidLocaleNoMessagesFile) { } TEST(ExtensionL10nUtil, GetValidLocalesWithUnsupportedLocale) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -175,7 +175,7 @@ TEST(ExtensionL10nUtil, LoadMessageCatalogsValidFallback) { } TEST(ExtensionL10nUtil, LoadMessageCatalogsMissingFiles) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -194,7 +194,7 @@ TEST(ExtensionL10nUtil, LoadMessageCatalogsMissingFiles) { } TEST(ExtensionL10nUtil, LoadMessageCatalogsBadJSONFormat) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); @@ -221,7 +221,7 @@ TEST(ExtensionL10nUtil, LoadMessageCatalogsBadJSONFormat) { } TEST(ExtensionL10nUtil, LoadMessageCatalogsDuplicateKeys) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath src_path = temp.path().Append(Extension::kLocaleFolder); diff --git a/chrome/common/extensions/extension_resource_unittest.cc b/chrome/common/extensions/extension_resource_unittest.cc index 67c9ebdb1a11db..acb6ad51d082c0 100644 --- a/chrome/common/extensions/extension_resource_unittest.cc +++ b/chrome/common/extensions/extension_resource_unittest.cc @@ -5,8 +5,8 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_l10n_util.h" @@ -44,7 +44,7 @@ TEST(ExtensionResourceTest, CreateWithMissingResourceOnDisk) { } TEST(ExtensionResourceTest, ResourcesOutsideOfPath) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); FilePath inner_dir = temp.path().AppendASCII("directory"); @@ -106,7 +106,7 @@ TEST(ExtensionResourceTest, ResourcesOutsideOfPath) { #define CreateWithAllResourcesOnDisk DISABLED_CreateWithAllResourcesOnDisk #endif TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) { - ScopedTempDir temp; + base::ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); // Create resource in the extension root. diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc index 2681513d9d377b..135de360e541f1 100644 --- a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc +++ b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc @@ -5,8 +5,8 @@ #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" #include "base/command_line.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_manifest_constants.h" #include "testing/gtest/include/gtest/gtest.h" @@ -106,7 +106,7 @@ TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) { scoped_ptr manifest( LoadManifestFile("init_valid_platform_app.json", &error)); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Create each manifest. diff --git a/chrome/common/extensions/unpacker.cc b/chrome/common/extensions/unpacker.cc index 001baa55599853..08eb09b904a28b 100644 --- a/chrome/common/extensions/unpacker.cc +++ b/chrome/common/extensions/unpacker.cc @@ -7,18 +7,18 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/rtl.h" #include "base/json/json_file_value_serializer.h" #include "base/memory/scoped_handle.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/threading/thread.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_l10n_util.h" +#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/url_constants.h" #include "chrome/common/zip.h" #include "content/public/common/common_param_traits.h" diff --git a/chrome/common/extensions/unpacker_unittest.cc b/chrome/common/extensions/unpacker_unittest.cc index 5f69ebbde2f2b6..bbb8b55a6a6a88 100644 --- a/chrome/common/extensions/unpacker_unittest.cc +++ b/chrome/common/extensions/unpacker_unittest.cc @@ -3,8 +3,8 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -53,7 +53,7 @@ class UnpackerTest : public testing::Test { } protected: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr unpacker_; }; diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc index 11982ec32d8baa..69685f2867466d 100644 --- a/chrome/common/json_value_serializer_unittest.cc +++ b/chrome/common/json_value_serializer_unittest.cc @@ -4,12 +4,12 @@ #include "base/basictypes.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/json/json_reader.h" #include "base/json/json_string_value_serializer.h" #include "base/json/json_writer.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -244,7 +244,7 @@ class JSONFileValueSerializerTest : public testing::Test { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; TEST_F(JSONFileValueSerializerTest, Roundtrip) { diff --git a/chrome/common/mac/app_mode_chrome_locator_unittest.mm b/chrome/common/mac/app_mode_chrome_locator_unittest.mm index b54fee7553878c..2713ddca7ffba0 100644 --- a/chrome/common/mac/app_mode_chrome_locator_unittest.mm +++ b/chrome/common/mac/app_mode_chrome_locator_unittest.mm @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/chrome_constants.h" #include "testing/gtest/include/gtest/gtest.h" @@ -40,7 +40,7 @@ void GetChromeBundlePath(FilePath* chrome_bundle) { } TEST(ChromeLocatorTest, GetNonExistentBundleInfo) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); string16 raw_version; diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index f68064a930d79a..a875c0dfab64b6 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc @@ -27,8 +27,8 @@ #endif #if defined(OS_POSIX) -#include "chrome/common/auto_start_linux.h" #include +#include "chrome/common/auto_start_linux.h" #endif #if defined(USE_AURA) @@ -241,8 +241,8 @@ MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestShutdown) { #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/mac/mac_util.h" -#include "base/scoped_temp_dir.h" #include "base/test/test_timeouts.h" #include "base/threading/thread.h" #include "chrome/common/mac/launchd.h" @@ -289,7 +289,7 @@ class ServiceProcessStateFileManipulationTest : public ::testing::Test { void Run() { loop_.Run(); } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoopForUI loop_; base::Thread io_thread_; FilePath executable_path_, bundle_path_; diff --git a/chrome/common/zip_reader_unittest.cc b/chrome/common/zip_reader_unittest.cc index ea65ae38fd6626..5afe4afbb13c7d 100644 --- a/chrome/common/zip_reader_unittest.cc +++ b/chrome/common/zip_reader_unittest.cc @@ -14,9 +14,9 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/md5.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" @@ -112,7 +112,7 @@ class ZipReaderTest : public PlatformTest { FilePath evil_via_absolute_file_name_zip_file_; std::set test_zip_contents_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; TEST_F(ZipReaderTest, Open_ValidZipFile) { diff --git a/chrome/common/zip_unittest.cc b/chrome/common/zip_unittest.cc index d2cff716971c4d..4d3d5d8ac91497 100644 --- a/chrome/common/zip_unittest.cc +++ b/chrome/common/zip_unittest.cc @@ -6,8 +6,8 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/zip.h" @@ -87,7 +87,7 @@ class ZipTest : public PlatformTest { // The path to temporary directory used to contain the test operations. FilePath test_dir_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Hard-coded contents of a known zip file. std::set zip_contents_; @@ -139,7 +139,7 @@ TEST_F(ZipTest, Zip) { ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &src_dir)); src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath zip_file = temp_dir.path().AppendASCII("out.zip"); @@ -152,7 +152,7 @@ TEST_F(ZipTest, ZipIgnoreHidden) { ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &src_dir)); src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath zip_file = temp_dir.path().AppendASCII("out.zip"); @@ -165,7 +165,7 @@ TEST_F(ZipTest, ZipFiles) { ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &src_dir)); src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath zip_file = temp_dir.path().AppendASCII("out.zip"); diff --git a/chrome/installer/mini_installer/decompress_test.cc b/chrome/installer/mini_installer/decompress_test.cc index 5bf5340110cd57..d820d666782926 100644 --- a/chrome/installer/mini_installer/decompress_test.cc +++ b/chrome/installer/mini_installer/decompress_test.cc @@ -5,8 +5,8 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "chrome/installer/mini_installer/decompress.h" #include "testing/gtest/include/gtest/gtest.h" @@ -21,7 +21,7 @@ TEST(MiniDecompressTest, ExpandTest) { // Prepare a temp folder that will be automatically deleted along with // our temporary test data. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath dest_path(temp_dir.path().Append(FILE_PATH_LITERAL("setup.exe"))); diff --git a/chrome/installer/setup/chrome_frame_quick_enable.cc b/chrome/installer/setup/chrome_frame_quick_enable.cc index 11eb578e9472ce..6dff64e132fd7e 100644 --- a/chrome/installer/setup/chrome_frame_quick_enable.cc +++ b/chrome/installer/setup/chrome_frame_quick_enable.cc @@ -6,8 +6,8 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/win/registry.h" #include "chrome/installer/setup/install_worker.h" @@ -81,7 +81,7 @@ InstallStatus ChromeFrameQuickEnable(const InstallationState& machine_state, LOG(ERROR) << "AddProduct failed"; status = INSTALL_FAILED; } else { - ScopedTempDir temp_path; + base::ScopedTempDir temp_path; if (!temp_path.CreateUniqueTempDir()) { PLOG(ERROR) << "Failed to create Temp directory"; return INSTALL_FAILED; diff --git a/chrome/installer/setup/install_unittest.cc b/chrome/installer/setup/install_unittest.cc index 4416c80339e5d3..9fd7eff9385d9d 100644 --- a/chrome/installer/setup/install_unittest.cc +++ b/chrome/installer/setup/install_unittest.cc @@ -8,10 +8,10 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/test/scoped_path_override.h" #include "base/test/test_shortcut_win.h" @@ -53,7 +53,7 @@ class CreateVisualElementsManifestTest : public testing::Test { } // The temporary directory used to contain the test operations. - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; // A dummy version number used to create the version directory. Version version_; @@ -185,13 +185,13 @@ class InstallShortcutTest : public testing::Test { scoped_ptr product_; scoped_ptr prefs_; - ScopedTempDir temp_dir_; - ScopedTempDir fake_user_desktop_; - ScopedTempDir fake_common_desktop_; - ScopedTempDir fake_user_quick_launch_; - ScopedTempDir fake_default_user_quick_launch_; - ScopedTempDir fake_start_menu_; - ScopedTempDir fake_common_start_menu_; + base::ScopedTempDir temp_dir_; + base::ScopedTempDir fake_user_desktop_; + base::ScopedTempDir fake_common_desktop_; + base::ScopedTempDir fake_user_quick_launch_; + base::ScopedTempDir fake_default_user_quick_launch_; + base::ScopedTempDir fake_start_menu_; + base::ScopedTempDir fake_common_start_menu_; scoped_ptr user_desktop_override_; scoped_ptr common_desktop_override_; scoped_ptr user_quick_launch_override_; diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 152036ef25e97d..89e1eeb64271f3 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -12,9 +12,9 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/file_version_info.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_number_conversions.h" #include "base/string_util.h" @@ -1166,7 +1166,7 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state, // patch to current exe, and store the resulting binary in the path // specified by --new-setup-exe. But we need to first unpack the file // given in --update-setup-exe. - ScopedTempDir temp_path; + base::ScopedTempDir temp_path; if (!temp_path.CreateUniqueTempDir()) { PLOG(ERROR) << "Could not create temporary path."; } else { diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc index 9dbace9847b238..c5b128722d6e8a 100644 --- a/chrome/installer/setup/setup_util_unittest.cc +++ b/chrome/installer/setup/setup_util_unittest.cc @@ -7,11 +7,11 @@ #include #include "base/file_util.h" -#include "base/path_service.h" -#include "base/scoped_temp_dir.h" -#include "base/time.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" +#include "base/path_service.h" #include "base/threading/platform_thread.h" +#include "base/time.h" #include "base/win/scoped_handle.h" #include "chrome/common/chrome_paths.h" #include "chrome/installer/setup/setup_util.h" @@ -36,7 +36,7 @@ class SetupUtilTestWithDir : public testing::Test { } // The temporary directory used to contain the test operations. - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; // The path to input data used in tests. FilePath data_dir_; diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc index 3d03ab77ac9793..e403fea83085e8 100644 --- a/chrome/installer/test/alternate_version_generator.cc +++ b/chrome/installer/test/alternate_version_generator.cc @@ -26,8 +26,8 @@ #include #include -#include #include +#include #include #include diff --git a/chrome/installer/util/copy_tree_work_item.h b/chrome/installer/util/copy_tree_work_item.h index 3b41f06323110f..c62a601c006bfd 100644 --- a/chrome/installer/util/copy_tree_work_item.h +++ b/chrome/installer/util/copy_tree_work_item.h @@ -6,8 +6,8 @@ #define CHROME_INSTALLER_UTIL_COPY_TREE_WORK_ITEM_H_ #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/gtest_prod_util.h" -#include "base/scoped_temp_dir.h" #include "chrome/installer/util/work_item.h" // A WorkItem subclass that recursively copies a file system hierarchy from @@ -77,7 +77,7 @@ class CopyTreeWorkItem : public WorkItem { bool copied_to_alternate_path_; // The temporary directory into which the original dest_path_ has been moved. - ScopedTempDir backup_path_; + base::ScopedTempDir backup_path_; FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileSameContent); FRIEND_TEST_ALL_PREFIXES(CopyTreeWorkItemTest, CopyFileInUse); diff --git a/chrome/installer/util/copy_tree_work_item_unittest.cc b/chrome/installer/util/copy_tree_work_item_unittest.cc index 3a19a4c6913227..d9e0b6c34555ff 100644 --- a/chrome/installer/util/copy_tree_work_item_unittest.cc +++ b/chrome/installer/util/copy_tree_work_item_unittest.cc @@ -8,11 +8,11 @@ #include "base/base_paths.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/threading/platform_thread.h" #include "chrome/installer/util/copy_tree_work_item.h" @@ -32,8 +32,8 @@ namespace { } // the path to temporary directory used to contain the test operations - ScopedTempDir test_dir_; - ScopedTempDir temp_dir_; + base::ScopedTempDir test_dir_; + base::ScopedTempDir temp_dir_; }; // Simple function to dump some text into a new file. diff --git a/chrome/installer/util/create_dir_work_item_unittest.cc b/chrome/installer/util/create_dir_work_item_unittest.cc index 6d97bbe932212f..76db1a64126a1c 100644 --- a/chrome/installer/util/create_dir_work_item_unittest.cc +++ b/chrome/installer/util/create_dir_work_item_unittest.cc @@ -6,9 +6,9 @@ #include "base/base_paths.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/installer/util/create_dir_work_item.h" #include "chrome/installer/util/work_item.h" @@ -21,7 +21,7 @@ namespace { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; }; diff --git a/chrome/installer/util/delete_tree_work_item.cc b/chrome/installer/util/delete_tree_work_item.cc index 812c1d05fbea41..31e06bd48ae16d 100644 --- a/chrome/installer/util/delete_tree_work_item.cc +++ b/chrome/installer/util/delete_tree_work_item.cc @@ -38,7 +38,7 @@ DeleteTreeWorkItem::DeleteTreeWorkItem( NOTREACHED() << "Impossibly large key_paths collection"; } else if (num_key_files_ != 0) { key_paths_.reset(new FilePath[num_key_files_]); - key_backup_paths_.reset(new ScopedTempDir[num_key_files_]); + key_backup_paths_.reset(new base::ScopedTempDir[num_key_files_]); std::copy(key_paths.begin(), key_paths.end(), &key_paths_[0]); } } @@ -57,7 +57,7 @@ bool DeleteTreeWorkItem::Do() { bool abort = false; for (ptrdiff_t i = 0; !abort && i != num_key_files_; ++i) { FilePath& key_file = key_paths_[i]; - ScopedTempDir& backup = key_backup_paths_[i]; + base::ScopedTempDir& backup = key_backup_paths_[i]; if (!ignore_failure_) { if (!backup.CreateUniqueTempDirUnderPath(temp_path_)) { PLOG(ERROR) << "Could not create temp dir in " << temp_path_.value(); @@ -147,7 +147,7 @@ void DeleteTreeWorkItem::Rollback() { } for (ptrdiff_t i = 0; i != num_key_files_; ++i) { - ScopedTempDir& backup_dir = key_backup_paths_[i]; + base::ScopedTempDir& backup_dir = key_backup_paths_[i]; if (!backup_dir.path().empty()) { FilePath& key_file = key_paths_[i]; FilePath backup_file = backup_dir.path().Append(key_file.BaseName()); diff --git a/chrome/installer/util/delete_tree_work_item.h b/chrome/installer/util/delete_tree_work_item.h index 2bf7471c9c25ae..aba34caf518eea 100644 --- a/chrome/installer/util/delete_tree_work_item.h +++ b/chrome/installer/util/delete_tree_work_item.h @@ -8,8 +8,8 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "chrome/installer/util/work_item.h" // A WorkItem subclass that recursively deletes a file system hierarchy at the @@ -47,11 +47,11 @@ class DeleteTreeWorkItem : public WorkItem { // Contains the temp directories for the backed-up key files. The directories // are created and populated in Do() as-needed. We don't use a standard - // container for this since ScopedTempDir isn't CopyConstructible. - scoped_array key_backup_paths_; + // container for this since base::ScopedTempDir isn't CopyConstructible. + scoped_array key_backup_paths_; // The temporary directory into which the original root_path_ has been moved. - ScopedTempDir backup_path_; + base::ScopedTempDir backup_path_; // Set to true once root_path_ has been copied into backup_path_. bool copied_to_backup_; diff --git a/chrome/installer/util/delete_tree_work_item_unittest.cc b/chrome/installer/util/delete_tree_work_item_unittest.cc index 239e098828134b..e2b601d2cf1c7d 100644 --- a/chrome/installer/util/delete_tree_work_item_unittest.cc +++ b/chrome/installer/util/delete_tree_work_item_unittest.cc @@ -8,11 +8,11 @@ #include "base/base_paths.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/installer/util/delete_tree_work_item.h" #include "chrome/installer/util/work_item.h" @@ -26,7 +26,7 @@ namespace { } // The temporary directory used to contain the test operations. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; // Simple function to dump some text into a new file. @@ -72,7 +72,7 @@ TEST_F(DeleteTreeWorkItemTest, DeleteTreeNoKeyPath) { ASSERT_TRUE(file_util::PathExists(file_name_delete_2)); // Test Do(). - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); std::vector key_files; @@ -124,7 +124,7 @@ TEST_F(DeleteTreeWorkItemTest, DeleteTree) { ASSERT_TRUE(file_util::PathExists(file_name_delete_2)); // test Do() - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); std::vector key_files(1, file_name_delete_1); @@ -197,7 +197,7 @@ TEST_F(DeleteTreeWorkItemTest, DeleteTreeInUse) { // test Do(). { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); std::vector key_paths(1, key_path); diff --git a/chrome/installer/util/duplicate_tree_detector_unittest.cc b/chrome/installer/util/duplicate_tree_detector_unittest.cc index d1445dcdf1cfcf..fb021947d19438 100644 --- a/chrome/installer/util/duplicate_tree_detector_unittest.cc +++ b/chrome/installer/util/duplicate_tree_detector_unittest.cc @@ -7,7 +7,7 @@ #include #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string16.h" #include "base/string_util.h" #include "chrome/installer/util/duplicate_tree_detector.h" @@ -60,8 +60,8 @@ class DuplicateTreeDetectorTest : public testing::Test { ASSERT_TRUE(installer::test::CopyFileHierarchy(d1, second_root)); } - ScopedTempDir temp_source_dir_; - ScopedTempDir temp_dest_dir_; + base::ScopedTempDir temp_source_dir_; + base::ScopedTempDir temp_dest_dir_; static const wchar_t text_content_1_[]; static const wchar_t text_content_2_[]; diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc index b7e1bd0537af1c..f62ea1bf216a86 100644 --- a/chrome/installer/util/installer_state_unittest.cc +++ b/chrome/installer/util/installer_state_unittest.cc @@ -10,9 +10,9 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/test/test_reg_util_win.h" #include "base/utf_string_conversions.h" @@ -144,7 +144,7 @@ TEST_F(InstallerStateTest, Delete) { BuildSingleChromeState(chrome_dir, &installer_state); Version latest_version("1.0.4.0"); { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); installer_state.RemoveOldVersionDirectories(latest_version, NULL, temp_dir.path()); @@ -225,7 +225,7 @@ TEST_F(InstallerStateTest, DeleteInUsed) { Version latest_version("1.0.4.0"); Version existing_version("1.0.1.0"); { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); installer_state.RemoveOldVersionDirectories(latest_version, &existing_version, @@ -302,7 +302,7 @@ TEST_F(InstallerStateTest, Basic) { EXPECT_TRUE(file.IsValid()); EXPECT_TRUE(file_util::PathExists(old_chrome_dll)); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Don't explicitly tell the directory cleanup logic not to delete the @@ -469,7 +469,7 @@ TEST_F(InstallerStateTest, GetCurrentVersionMigrateChrome) { } TEST_F(InstallerStateTest, IsFileInUse) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file; diff --git a/chrome/installer/util/logging_installer_unittest.cc b/chrome/installer/util/logging_installer_unittest.cc index e77b046561ca0f..0a858ddec37d2a 100644 --- a/chrome/installer/util/logging_installer_unittest.cc +++ b/chrome/installer/util/logging_installer_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/win/scoped_handle.h" #include "chrome/installer/util/logging_installer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -15,7 +15,7 @@ TEST(LoggingInstallerTest, TestTruncate) { const std::string test_data(installer::kMaxInstallerLogFileSize + 1, 'a'); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file = temp_dir.path().Append(L"temp"); @@ -40,7 +40,7 @@ TEST(LoggingInstallerTest, TestTruncate) { TEST(LoggingInstallerTest, TestTruncationNotNeeded) { const std::string test_data(installer::kMaxInstallerLogFileSize, 'a'); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file = temp_dir.path().Append(L"temp"); @@ -62,7 +62,7 @@ TEST(LoggingInstallerTest, TestTruncationNotNeeded) { TEST(LoggingInstallerTest, TestInUseNeedsTruncation) { const std::string test_data(installer::kMaxInstallerLogFileSize + 1, 'a'); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file = temp_dir.path().Append(L"temp"); @@ -91,7 +91,7 @@ TEST(LoggingInstallerTest, TestInUseNeedsTruncation) { TEST(LoggingInstallerTest, TestMoveFailsNeedsTruncation) { const std::string test_data(installer::kMaxInstallerLogFileSize + 1, 'a'); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file = temp_dir.path().Append(L"temp"); diff --git a/chrome/installer/util/lzma_util_unittest.cc b/chrome/installer/util/lzma_util_unittest.cc index 06a8dfd2ec3fe0..c4c87eb825c33d 100644 --- a/chrome/installer/util/lzma_util_unittest.cc +++ b/chrome/installer/util/lzma_util_unittest.cc @@ -5,9 +5,9 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "chrome/common/chrome_paths.h" #include "chrome/installer/util/lzma_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -23,7 +23,7 @@ class LzmaUtilTest : public testing::Test { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // The path to input data used in tests. FilePath data_dir_; diff --git a/chrome/installer/util/move_tree_work_item.h b/chrome/installer/util/move_tree_work_item.h index 62a84bab67b4b9..cde93021da78a1 100644 --- a/chrome/installer/util/move_tree_work_item.h +++ b/chrome/installer/util/move_tree_work_item.h @@ -6,8 +6,8 @@ #define CHROME_INSTALLER_UTIL_MOVE_TREE_WORK_ITEM_H_ #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/gtest_prod_util.h" -#include "base/scoped_temp_dir.h" #include "chrome/installer/util/work_item.h" // A WorkItem subclass that recursively move a file system hierarchy from @@ -57,7 +57,7 @@ class MoveTreeWorkItem : public WorkItem { FilePath temp_dir_; // The temporary directory into which the original dest_path_ has been moved. - ScopedTempDir backup_path_; + base::ScopedTempDir backup_path_; // Whether the source was moved to dest_path_ bool moved_to_dest_path_; diff --git a/chrome/installer/util/move_tree_work_item_unittest.cc b/chrome/installer/util/move_tree_work_item_unittest.cc index ebe47d20c72467..9b1e93b08cf2f9 100644 --- a/chrome/installer/util/move_tree_work_item_unittest.cc +++ b/chrome/installer/util/move_tree_work_item_unittest.cc @@ -25,8 +25,8 @@ class MoveTreeWorkItemTest : public testing::Test { ASSERT_TRUE(temp_to_dir_.CreateUniqueTempDir()); } - ScopedTempDir temp_from_dir_; - ScopedTempDir temp_to_dir_; + base::ScopedTempDir temp_from_dir_; + base::ScopedTempDir temp_to_dir_; }; // Simple function to dump some text into a new file. diff --git a/chrome/installer/util/product_unittest.h b/chrome/installer/util/product_unittest.h index 167afa9906018f..05c903c50dcb40 100644 --- a/chrome/installer/util/product_unittest.h +++ b/chrome/installer/util/product_unittest.h @@ -9,8 +9,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" class TestWithTempDir : public testing::Test { @@ -18,7 +18,7 @@ class TestWithTempDir : public testing::Test { virtual void SetUp(); virtual void TearDown(); - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; }; class TestWithTempDirAndDeleteTempOverrideKeys : public TestWithTempDir { diff --git a/chrome/installer/util/self_cleaning_temp_dir.cc b/chrome/installer/util/self_cleaning_temp_dir.cc index a95a7229466447..5a498acc259c52 100644 --- a/chrome/installer/util/self_cleaning_temp_dir.cc +++ b/chrome/installer/util/self_cleaning_temp_dir.cc @@ -76,7 +76,7 @@ bool SelfCleaningTempDir::Delete() { bool schedule_deletes = false; // First try to recursively delete the leaf directory managed by our - // ScopedTempDir. + // base::ScopedTempDir. if (!file_util::Delete(path(), true)) { // That failed, so schedule the temp dir and its contents for deletion after // reboot. diff --git a/chrome/installer/util/self_cleaning_temp_dir.h b/chrome/installer/util/self_cleaning_temp_dir.h index f76c6f605530a9..6e46ce289f694e 100644 --- a/chrome/installer/util/self_cleaning_temp_dir.h +++ b/chrome/installer/util/self_cleaning_temp_dir.h @@ -12,7 +12,7 @@ namespace installer { // A helper class for managing a temporary directory. In relation to -// ScopedTempDir, this class additionally cleans up all non-empty parent +// base::ScopedTempDir, this class additionally cleans up all non-empty parent // directories of the temporary directory that are created by an instance. class SelfCleaningTempDir { public: diff --git a/chrome/installer/util/self_cleaning_temp_dir_unittest.cc b/chrome/installer/util/self_cleaning_temp_dir_unittest.cc index 3cc38789f927d0..e49c22815a8876 100644 --- a/chrome/installer/util/self_cleaning_temp_dir_unittest.cc +++ b/chrome/installer/util/self_cleaning_temp_dir_unittest.cc @@ -6,7 +6,7 @@ #include #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "chrome/installer/util/self_cleaning_temp_dir.h" @@ -66,7 +66,7 @@ TEST_F(SelfCleaningTempDirTest, TopLevelPlusOne) { // Delete() is called. TEST_F(SelfCleaningTempDirTest, RemoveUnusedOnDelete) { // Make a directory in which we'll work. - ScopedTempDir work_dir; + base::ScopedTempDir work_dir; EXPECT_TRUE(work_dir.CreateUniqueTempDir()); // Make up some path under the temp dir. @@ -87,7 +87,7 @@ TEST_F(SelfCleaningTempDirTest, RemoveUnusedOnDelete) { // Test that two clients can work in the same area. TEST_F(SelfCleaningTempDirTest, TwoClients) { // Make a directory in which we'll work. - ScopedTempDir work_dir; + base::ScopedTempDir work_dir; EXPECT_TRUE(work_dir.CreateUniqueTempDir()); // Make up some path under the temp dir. @@ -124,7 +124,7 @@ TEST_F(SelfCleaningTempDirTest, TwoClients) { // destructor is called. TEST_F(SelfCleaningTempDirTest, RemoveUnusedOnDestroy) { // Make a directory in which we'll work. - ScopedTempDir work_dir; + base::ScopedTempDir work_dir; EXPECT_TRUE(work_dir.CreateUniqueTempDir()); // Make up some path under the temp dir. @@ -149,7 +149,7 @@ TEST_F(SelfCleaningTempDirTest, LeaveUsedOnDestroy) { static const char kHiHon[] = "hi, hon"; // Make a directory in which we'll work. - ScopedTempDir work_dir; + base::ScopedTempDir work_dir; EXPECT_TRUE(work_dir.CreateUniqueTempDir()); // Make up some path under the temp dir. diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc index eec57cc0ffadd0..fa6b8b96bc64eb 100644 --- a/chrome/installer/util/shell_util_unittest.cc +++ b/chrome/installer/util/shell_util_unittest.cc @@ -9,11 +9,11 @@ #include "base/base_paths.h" #include "base/base_paths_win.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/md5.h" -#include "base/scoped_temp_dir.h" +#include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "base/string_util.h" -#include "base/memory/scoped_ptr.h" #include "base/test/scoped_path_override.h" #include "base/test/test_shortcut_win.h" #include "base/win/shortcut.h" @@ -156,13 +156,13 @@ class ShellUtilShortcutTest : public testing::Test { // A ShellUtil::ShortcutProperties object with common properties set already. scoped_ptr test_properties_; - ScopedTempDir temp_dir_; - ScopedTempDir fake_user_desktop_; - ScopedTempDir fake_common_desktop_; - ScopedTempDir fake_user_quick_launch_; - ScopedTempDir fake_default_user_quick_launch_; - ScopedTempDir fake_start_menu_; - ScopedTempDir fake_common_start_menu_; + base::ScopedTempDir temp_dir_; + base::ScopedTempDir fake_user_desktop_; + base::ScopedTempDir fake_common_desktop_; + base::ScopedTempDir fake_user_quick_launch_; + base::ScopedTempDir fake_default_user_quick_launch_; + base::ScopedTempDir fake_start_menu_; + base::ScopedTempDir fake_common_start_menu_; scoped_ptr user_desktop_override_; scoped_ptr common_desktop_override_; scoped_ptr user_quick_launch_override_; @@ -428,7 +428,7 @@ TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) { } TEST_F(ShellUtilShortcutTest, DontRemoveChromeShortcutIfPointsToAnotherChrome) { - ScopedTempDir other_exe_dir; + base::ScopedTempDir other_exe_dir; ASSERT_TRUE(other_exe_dir.CreateUniqueTempDir()); FilePath other_chrome_exe = other_exe_dir.path().Append(installer::kChromeExe); diff --git a/chrome/installer/util/work_item_list_unittest.cc b/chrome/installer/util/work_item_list_unittest.cc index 71c75f217b7c04..36f2f9eba40b93 100644 --- a/chrome/installer/util/work_item_list_unittest.cc +++ b/chrome/installer/util/work_item_list_unittest.cc @@ -6,9 +6,9 @@ #include "base/base_paths.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/win/registry.h" #include "chrome/installer/util/conditional_work_item_list.h" @@ -45,7 +45,7 @@ class WorkItemListTest : public testing::Test { ASSERT_EQ(ERROR_SUCCESS, key.DeleteKey(kTestRoot)); } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; } // namespace diff --git a/chrome/renderer/safe_browsing/scorer_unittest.cc b/chrome/renderer/safe_browsing/scorer_unittest.cc index d588017289cb8f..c9c18c246ed268 100644 --- a/chrome/renderer/safe_browsing/scorer_unittest.cc +++ b/chrome/renderer/safe_browsing/scorer_unittest.cc @@ -6,11 +6,11 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/hash_tables.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/threading/thread.h" #include "chrome/common/safe_browsing/client_model.pb.h" #include "chrome/renderer/safe_browsing/features.h" diff --git a/chrome/service/cloud_print/connector_settings_unittest.cc b/chrome/service/cloud_print/connector_settings_unittest.cc index b86c3153ed4203..a2bd869d2ccca3 100644 --- a/chrome/service/cloud_print/connector_settings_unittest.cc +++ b/chrome/service/cloud_print/connector_settings_unittest.cc @@ -7,9 +7,9 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/values.h" #include "chrome/service/cloud_print/cloud_print_consts.h" #include "chrome/service/service_process_prefs.h" @@ -63,7 +63,7 @@ class ConnectorSettingsTest : public testing::Test { return prefs; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; MessageLoop message_loop_; scoped_refptr message_loop_proxy_; }; diff --git a/chrome/service/service_process_prefs_unittest.cc b/chrome/service/service_process_prefs_unittest.cc index b1ad7f62c06f64..5d68ab31d17ac4 100644 --- a/chrome/service/service_process_prefs_unittest.cc +++ b/chrome/service/service_process_prefs_unittest.cc @@ -4,8 +4,8 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/sequenced_task_runner.h" #include "chrome/service/service_process_prefs.h" #include "testing/gmock/include/gmock/gmock.h" @@ -26,7 +26,7 @@ class ServiceProcessPrefsTest : public testing::Test { } // The path to temporary directory used to contain the test operations. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // A message loop that we can use as the file thread message loop. MessageLoop message_loop_; scoped_ptr prefs_; diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc index f0bc6219fd2e48..66cc0287d0e0c5 100644 --- a/chrome/service/service_utility_process_host.cc +++ b/chrome/service/service_utility_process_host.cc @@ -7,11 +7,11 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_utility_messages.h" @@ -56,7 +56,7 @@ bool ServiceUtilityProcessHost::StartRenderPDFPagesToMetafile( NOTIMPLEMENTED(); return false; #else // !defined(OS_WIN) - scratch_metafile_dir_.reset(new ScopedTempDir); + scratch_metafile_dir_.reset(new base::ScopedTempDir); if (!scratch_metafile_dir_->CreateUniqueTempDir()) return false; if (!file_util::CreateTemporaryFileInDir(scratch_metafile_dir_->path(), @@ -230,12 +230,12 @@ void ServiceUtilityProcessHost::Client::MetafileAvailable( double scale_factor) { // The metafile was created in a temp folder which needs to get deleted after // we have processed it. - ScopedTempDir scratch_metafile_dir; + base::ScopedTempDir scratch_metafile_dir; if (!scratch_metafile_dir.Set(metafile_path.DirName())) LOG(WARNING) << "Unable to set scratch metafile directory"; #if defined(OS_WIN) // It's important that metafile is declared after scratch_metafile_dir so - // that the metafile destructor closes the file before the ScopedTempDir + // that the metafile destructor closes the file before the base::ScopedTempDir // destructor tries to remove the directory. printing::Emf metafile; if (!metafile.InitFromFile(metafile_path)) { diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index a2d9b23ebcaa50..cf5079425dd00e 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -15,15 +15,15 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/process.h" -#include "ipc/ipc_channel.h" #include "content/public/common/child_process_host_delegate.h" +#include "ipc/ipc_channel.h" #include "printing/pdf_render_settings.h" class CommandLine; -class ScopedTempDir; namespace base { class MessageLoopProxy; +class ScopedTempDir; } // namespace base namespace content { @@ -146,7 +146,7 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { // The path to the temp file where the metafile will be written to. FilePath metafile_path_; // The temporary folder created for the metafile. - scoped_ptr scratch_metafile_dir_; + scoped_ptr scratch_metafile_dir_; DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); }; diff --git a/chrome/test/automation/proxy_launcher.h b/chrome/test/automation/proxy_launcher.h index 763012dad22074..1c6569b5fd1d76 100644 --- a/chrome/test/automation/proxy_launcher.h +++ b/chrome/test/automation/proxy_launcher.h @@ -11,9 +11,9 @@ #include "base/callback.h" #include "base/command_line.h" #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/process.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" class AutomationProxy; @@ -160,7 +160,7 @@ class ProxyLauncher { // We use a temporary directory for profile to avoid issues with being // unable to delete some files because they're in use, etc. - ScopedTempDir temp_profile_dir_; + base::ScopedTempDir temp_profile_dir_; // Handle to the first Chrome process. base::ProcessHandle process_; diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h index 2747f7abffc177..de72dc2563dad4 100644 --- a/chrome/test/base/in_process_browser_test.h +++ b/chrome/test/base/in_process_browser_test.h @@ -6,9 +6,9 @@ #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_base.h" @@ -196,7 +196,7 @@ class InProcessBrowserTest : public content::BrowserTestBase { // Temporary user data directory. Used only when a user data directory is not // specified in the command line. - ScopedTempDir temp_user_data_dir_; + base::ScopedTempDir temp_user_data_dir_; #if defined(OS_CHROMEOS) chromeos::ScopedStubCrosEnabler stub_cros_enabler_; diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h index d583854309a1ae..244ba79f39121c 100644 --- a/chrome/test/base/testing_profile.h +++ b/chrome/test/base/testing_profile.h @@ -7,9 +7,9 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/timer.h" #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "chrome/browser/profiles/profile.h" @@ -357,7 +357,7 @@ class TestingProfile : public Profile { // We use a temporary directory to store testing profile data. In a multi- // profile environment, this is invalid and the directory is managed by the // TestingProfileManager. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // The path to this profile. This will be valid in either of the two above // cases. FilePath profile_path_; diff --git a/chrome/test/base/testing_profile_manager.h b/chrome/test/base/testing_profile_manager.h index 9b72f55387e1c7..d37f0448d4b416 100644 --- a/chrome/test/base/testing_profile_manager.h +++ b/chrome/test/base/testing_profile_manager.h @@ -9,7 +9,7 @@ #include #include "base/compiler_specific.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string16.h" #include "chrome/test/base/testing_pref_service.h" @@ -75,7 +75,7 @@ class TestingProfileManager { bool called_set_up_; // The directory in which new profiles are placed. - ScopedTempDir profiles_dir_; + base::ScopedTempDir profiles_dir_; // Weak reference to the browser process on which the ProfileManager is set. TestingBrowserProcess* browser_process_; diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 5244a0a857d0f5..2d9abdba7b454b 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -423,7 +423,7 @@ void WaitForHistoryToLoad(HistoryService* history_service) { } void DownloadURL(Browser* browser, const GURL& download_url) { - ScopedTempDir downloads_directory; + base::ScopedTempDir downloads_directory; ASSERT_TRUE(downloads_directory.CreateUniqueTempDir()); browser->profile()->GetPrefs()->SetFilePath( prefs::kDownloadDefaultDirectory, downloads_directory.path()); diff --git a/chrome/test/chromedriver/chrome_impl.cc b/chrome/test/chromedriver/chrome_impl.cc index 04fe0cf0f0fb9f..5cac6f34942f6e 100644 --- a/chrome/test/chromedriver/chrome_impl.cc +++ b/chrome/test/chromedriver/chrome_impl.cc @@ -9,7 +9,7 @@ #include "chrome/test/chromedriver/status.h" ChromeImpl::ChromeImpl(base::ProcessHandle process, - ScopedTempDir* user_data_dir) + base::ScopedTempDir* user_data_dir) : process_(process) { if (user_data_dir->IsValid()) { CHECK(user_data_dir_.Set(user_data_dir->Take())); diff --git a/chrome/test/chromedriver/chrome_impl.h b/chrome/test/chromedriver/chrome_impl.h index c30f498e716e9e..1a6d1c8ccecbd9 100644 --- a/chrome/test/chromedriver/chrome_impl.h +++ b/chrome/test/chromedriver/chrome_impl.h @@ -6,15 +6,15 @@ #define CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/process.h" -#include "base/scoped_temp_dir.h" #include "chrome/test/chromedriver/chrome.h" class Status; class ChromeImpl : public Chrome { public: - ChromeImpl(base::ProcessHandle process, ScopedTempDir* user_data_dir); + ChromeImpl(base::ProcessHandle process, base::ScopedTempDir* user_data_dir); virtual ~ChromeImpl(); // Overridden from Chrome: @@ -22,7 +22,7 @@ class ChromeImpl : public Chrome { private: base::ProcessHandle process_; - ScopedTempDir user_data_dir_; + base::ScopedTempDir user_data_dir_; }; #endif // CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ diff --git a/chrome/test/chromedriver/chrome_launcher_impl.cc b/chrome/test/chromedriver/chrome_launcher_impl.cc index 85eb108a06d15f..3e124fbfd6c593 100644 --- a/chrome/test/chromedriver/chrome_launcher_impl.cc +++ b/chrome/test/chromedriver/chrome_launcher_impl.cc @@ -31,7 +31,7 @@ Status ChromeLauncherImpl::Launch( CommandLine command(program); command.AppendSwitch("enable-logging"); command.AppendSwitchASCII("logging-level", "1"); - ScopedTempDir user_data_dir; + base::ScopedTempDir user_data_dir; if (!user_data_dir.CreateUniqueTempDir()) return Status(kUnknownError, "cannot create temp dir for user data dir"); command.AppendSwitchPath("user-data-dir", user_data_dir.path()); diff --git a/chrome/test/logging/win/test_log_collector.cc b/chrome/test/logging/win/test_log_collector.cc index cff55b151e7067..3dbbfe6699b17b 100644 --- a/chrome/test/logging/win/test_log_collector.cc +++ b/chrome/test/logging/win/test_log_collector.cc @@ -13,10 +13,10 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "chrome/test/base/test_switches.h" #include "chrome/test/logging/win/file_logger.h" @@ -136,7 +136,7 @@ class TestLogCollector { // A temporary directory into which a log file is placed for the duration of // each test. Created/destroyed at collector SetUp and TearDown. - ScopedTempDir log_temp_dir_; + base::ScopedTempDir log_temp_dir_; // The test logger. Initialized/Unintitialized at collector SetUp and // TearDown. diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index fd695b269c2f6d..938f9c8e984cbe 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -18,12 +18,12 @@ #include "base/environment.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_file_value_serializer.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/test/test_file_util.h" @@ -47,9 +47,9 @@ #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" #include "chrome/test/base/chrome_process_util.h" -#include "chrome/test/base/testing_profile.h" #include "chrome/test/base/test_launcher_utils.h" #include "chrome/test/base/test_switches.h" +#include "chrome/test/base/testing_profile.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" #include "ui/gl/gl_implementation.h" diff --git a/chrome/test/webdriver/commands/create_session.cc b/chrome/test/webdriver/commands/create_session.cc index 8aad164f31c887..44730ebfbd3c97 100644 --- a/chrome/test/webdriver/commands/create_session.cc +++ b/chrome/test/webdriver/commands/create_session.cc @@ -8,7 +8,7 @@ #include "base/command_line.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/values.h" #include "chrome/test/webdriver/commands/response.h" #include "chrome/test/webdriver/webdriver_error.h" diff --git a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc index 20f6a714ab0f9f..2f7457deb8e2e6 100644 --- a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc +++ b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc @@ -5,7 +5,7 @@ #include "base/base64.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/values.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/zip.h" @@ -38,7 +38,7 @@ TEST(CapabilitiesParser, SimpleCaps) { options->SetBoolean("nativeEvents", true); Capabilities caps; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CapabilitiesParser parser(&dict, temp_dir.path(), Logger(), &caps); ASSERT_FALSE(parser.Parse()); @@ -61,7 +61,7 @@ TEST(CapabilitiesParser, Args) { options->Set("args", args); Capabilities caps; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CapabilitiesParser parser(&dict, temp_dir.path(), Logger(), &caps); ASSERT_FALSE(parser.Parse()); @@ -81,7 +81,7 @@ TEST(CapabilitiesParser, Extensions) { options->Set("extensions", extensions); Capabilities caps; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CapabilitiesParser parser(&dict, temp_dir.path(), Logger(), &caps); ASSERT_FALSE(parser.Parse()); @@ -99,7 +99,7 @@ TEST(CapabilitiesParser, Profile) { DictionaryValue* options = new DictionaryValue(); dict.Set("chromeOptions", options); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath folder = temp_dir.path().AppendASCII("folder"); ASSERT_TRUE(file_util::CreateDirectory(folder)); diff --git a/chrome/test/webdriver/webdriver_session.cc b/chrome/test/webdriver/webdriver_session.cc index 690c1897803e73..55a37f6289a64c 100644 --- a/chrome/test/webdriver/webdriver_session.cc +++ b/chrome/test/webdriver/webdriver_session.cc @@ -1839,7 +1839,7 @@ Error* Session::GetScreenShot(std::string* png) { "The current target does not support screenshot"); } Error* error = NULL; - ScopedTempDir screenshots_dir; + base::ScopedTempDir screenshots_dir; if (!screenshots_dir.CreateUniqueTempDir()) { return new Error(kUnknownError, "Could not create temp directory for screenshot"); diff --git a/chrome/test/webdriver/webdriver_session.h b/chrome/test/webdriver/webdriver_session.h index 2ca23bc84364cd..23395afce12bee 100644 --- a/chrome/test/webdriver/webdriver_session.h +++ b/chrome/test/webdriver/webdriver_session.h @@ -11,8 +11,8 @@ #include "base/callback_forward.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/threading/thread.h" #include "chrome/common/automation_constants.h" @@ -484,7 +484,7 @@ class Session { bool has_alert_prompt_text_; // Temporary directory containing session data. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; Capabilities capabilities_; // Current state of all modifier keys. diff --git a/chrome/test/webdriver/webdriver_util.cc b/chrome/test/webdriver/webdriver_util.cc index 5a4cd75324b4ab..2e8a491e07b800 100644 --- a/chrome/test/webdriver/webdriver_util.cc +++ b/chrome/test/webdriver/webdriver_util.cc @@ -7,16 +7,16 @@ #include "base/base64.h" #include "base/basictypes.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/memory/scoped_ptr.h" #include "base/rand_util.h" -#include "base/scoped_temp_dir.h" -#include "base/stringprintf.h" #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/third_party/icu/icu_utf.h" #include "chrome/common/automation_id.h" #include "chrome/common/zip.h" @@ -51,7 +51,7 @@ namespace { bool UnzipArchive(const FilePath& unzip_dir, const std::string& bytes, std::string* error_msg) { - ScopedTempDir dir; + base::ScopedTempDir dir; if (!dir.CreateUniqueTempDir()) { *error_msg = "Unable to create temp dir"; return false; diff --git a/chrome/test/webdriver/webdriver_util_unittest.cc b/chrome/test/webdriver/webdriver_util_unittest.cc index 7c824834d7342b..e41c647777ebcd 100644 --- a/chrome/test/webdriver/webdriver_util_unittest.cc +++ b/chrome/test/webdriver/webdriver_util_unittest.cc @@ -8,7 +8,7 @@ #include "base/base64.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "chrome/test/webdriver/webdriver_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -27,7 +27,7 @@ TEST(RandomIDTest, CanGenerateSufficientlyRandomIDs) { } TEST(ZipFileTest, ZipEntryToZipArchive) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); std::string data; // A zip entry sent from a Java WebDriver client (v2.20) that contains a diff --git a/chrome_frame/test/dll_redirector_loading_test.cc b/chrome_frame/test/dll_redirector_loading_test.cc index 9c46425153715c..8588e1272f5bd7 100644 --- a/chrome_frame/test/dll_redirector_loading_test.cc +++ b/chrome_frame/test/dll_redirector_loading_test.cc @@ -9,9 +9,9 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/file_version_info.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/scoped_native_library.h" -#include "base/scoped_temp_dir.h" #include "base/shared_memory.h" #include "base/string_util.h" #include "base/version.h" @@ -113,14 +113,14 @@ class DllRedirectorLoadingTest : public testing::Test { static scoped_ptr original_version_; static scoped_ptr new_version_; - static ScopedTempDir temp_dir_; + static base::ScopedTempDir temp_dir_; }; // class DllRedirectorLoadingTest FilePath DllRedirectorLoadingTest::original_chrome_frame_dll_; FilePath DllRedirectorLoadingTest::new_chrome_frame_dll_; scoped_ptr DllRedirectorLoadingTest::original_version_; scoped_ptr DllRedirectorLoadingTest::new_version_; -ScopedTempDir DllRedirectorLoadingTest::temp_dir_; +base::ScopedTempDir DllRedirectorLoadingTest::temp_dir_; #if defined(COMPONENT_BUILD) // Disabling since npchrome_frame.dll's DllMain can't handle being loaded into diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 99c9643a7fbf6f..2e2876da99ee15 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -14,12 +14,12 @@ #include "base/debug/debugger.h" #include "base/file_util.h" #include "base/file_version_info.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/icu_util.h" #include "base/lazy_instance.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/prefs/json_pref_store.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -379,7 +379,7 @@ class FakeBrowserProcessImpl : public BrowserProcessImpl { } private: - ScopedTempDir profiles_dir_; + base::ScopedTempDir profiles_dir_; scoped_ptr profile_manager_; }; diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 5aca036e564785..ff41daae98f8a4 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -6,6 +6,7 @@ #include "base/base_paths.h" #include "base/file_version_info.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/stringprintf.h" #include "base/test/test_timeouts.h" @@ -75,7 +76,7 @@ FilePath ChromeFrameTestWithWebServer::test_file_path_; FilePath ChromeFrameTestWithWebServer::results_dir_; FilePath ChromeFrameTestWithWebServer::CFInstall_path_; FilePath ChromeFrameTestWithWebServer::CFInstance_path_; -ScopedTempDir ChromeFrameTestWithWebServer::temp_dir_; +base::ScopedTempDir ChromeFrameTestWithWebServer::temp_dir_; FilePath ChromeFrameTestWithWebServer::chrome_user_data_dir_; chrome_frame_test::TimedMsgLoop* ChromeFrameTestWithWebServer::loop_; std::string ChromeFrameTestWithWebServer::local_address_; diff --git a/chrome_frame/test/test_with_web_server.h b/chrome_frame/test/test_with_web_server.h index 821afe9e0e6400..fe03b0fcf38f7b 100644 --- a/chrome_frame/test/test_with_web_server.h +++ b/chrome_frame/test/test_with_web_server.h @@ -8,7 +8,7 @@ #include #include -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" @@ -16,8 +16,8 @@ #include "chrome_frame/chrome_tab.h" #include "chrome_frame/test/chrome_frame_test_utils.h" #include "chrome_frame/test/test_server.h" -#include "testing/gtest/include/gtest/gtest.h" #include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" // Specifies the invocation method for CF. class CFInvocation { @@ -238,7 +238,7 @@ class ChromeFrameTestWithWebServer : public testing::Test { static FilePath chrome_user_data_dir_; // The user data directory used for Chrome instances. - static ScopedTempDir temp_dir_; + static base::ScopedTempDir temp_dir_; // The web server from which we serve the web! static chrome_frame_test::TimedMsgLoop* loop_; diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc index 8b4a0761e25db2..7567e4f6446c6c 100644 --- a/content/browser/appcache/chrome_appcache_service_unittest.cc +++ b/content/browser/appcache/chrome_appcache_service_unittest.cc @@ -4,11 +4,11 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" -#include "content/browser/browser_thread_impl.h" #include "content/browser/appcache/chrome_appcache_service.h" +#include "content/browser/browser_thread_impl.h" #include "content/public/browser/resource_context.h" #include "content/public/test/test_browser_context.h" #include "net/url_request/url_request_context_getter.h" @@ -81,7 +81,7 @@ class ChromeAppCacheServiceTest : public testing::Test { void InsertDataIntoAppCache(ChromeAppCacheService* appcache_service); MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; const GURL kProtectedManifestURL; const GURL kNormalManifestURL; const GURL kSessionOnlyManifestURL; diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc index c8d24b2944478f..033cd783aa3b0c 100644 --- a/content/browser/download/base_file_unittest.cc +++ b/content/browser/download/base_file_unittest.cc @@ -5,9 +5,9 @@ #include "content/browser/download/base_file.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/test/test_file_util.h" #include "content/browser/browser_thread_impl.h" @@ -203,7 +203,7 @@ class BaseFileTest : public testing::Test { scoped_ptr base_file_; // Temporary directory for renamed downloads. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Expect the file to survive deletion of the BaseFile instance. bool expect_file_survives_; diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc index 400290776f9084..8c3bbbc4862e24 100644 --- a/content/browser/download/download_browsertest.cc +++ b/content/browser/download/download_browsertest.cc @@ -7,7 +7,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/browser/download/download_file_factory.h" #include "content/browser/download/download_file_impl.h" #include "content/browser/download/download_item_impl.h" @@ -455,7 +455,7 @@ class DownloadContentTest : public ContentBrowserTest { } // Location of the downloads directory for these tests - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; }; IN_PROC_BROWSER_TEST_F(DownloadContentTest, DownloadCancelled) { diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc index 2bf454ce4bf784..3da638fb3f43ac 100644 --- a/content/browser/download/download_manager_impl_unittest.cc +++ b/content/browser/download/download_manager_impl_unittest.cc @@ -7,10 +7,10 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string16.h" #include "base/string_util.h" diff --git a/content/browser/download/drag_download_file_browsertest.cc b/content/browser/download/drag_download_file_browsertest.cc index 948b3ba0a48ec2..f56ec748f3d82e 100644 --- a/content/browser/download/drag_download_file_browsertest.cc +++ b/content/browser/download/drag_download_file_browsertest.cc @@ -4,7 +4,7 @@ #include "base/file_path.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/browser/download/download_file_factory.h" #include "content/browser/download/download_file_impl.h" #include "content/browser/download/download_item_impl.h" @@ -84,7 +84,7 @@ class DragDownloadFileTest : public ContentBrowserTest { } private: - ScopedTempDir downloads_directory_; + base::ScopedTempDir downloads_directory_; DISALLOW_COPY_AND_ASSIGN(DragDownloadFileTest); }; diff --git a/content/browser/download/file_metadata_unittest_linux.cc b/content/browser/download/file_metadata_unittest_linux.cc index ec2041a6c11dcf..4759dfa652ab0d 100644 --- a/content/browser/download/file_metadata_unittest_linux.cc +++ b/content/browser/download/file_metadata_unittest_linux.cc @@ -12,8 +12,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" -#include "base/scoped_temp_dir.h" #include "base/string_split.h" #include "content/browser/download/file_metadata_linux.h" #include "googleurl/src/gurl.h" @@ -104,7 +104,7 @@ class FileMetadataLinuxTest : public testing::Test { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath test_file_; GURL source_url_; GURL referrer_url_; diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc index 4fe0ef5262d8f9..6d21e7658b1437 100644 --- a/content/browser/download/mhtml_generation_browsertest.cc +++ b/content/browser/download/mhtml_generation_browsertest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/run_loop.h" -#include "base/scoped_temp_dir.h" #include "content/public/browser/web_contents.h" #include "content/public/test/test_utils.h" #include "content/shell/shell.h" @@ -35,7 +35,7 @@ class MHTMLGenerationTest : public ContentBrowserTest { bool mhtml_generated() const { return mhtml_generated_; } int64 file_size() const { return file_size_; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; private: bool mhtml_generated_; diff --git a/content/browser/download/save_package_browsertest.cc b/content/browser/download/save_package_browsertest.cc index 021f583c06e313..68e217efb08ad0 100644 --- a/content/browser/download/save_package_browsertest.cc +++ b/content/browser/download/save_package_browsertest.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/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/browser/download/save_package.h" #include "content/shell/shell.h" #include "content/test/content_browser_test.h" @@ -28,7 +28,7 @@ class SavePackageBrowserTest : public ContentBrowserTest { } // Temporary directory we will save pages to. - ScopedTempDir save_dir_; + base::ScopedTempDir save_dir_; }; // Create a SavePackage and delete it without calling Init. diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc index c55a66a087ca74..89fb89a9f7df56 100644 --- a/content/browser/download/save_package_unittest.cc +++ b/content/browser/download/save_package_unittest.cc @@ -5,8 +5,8 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "content/browser/browser_thread_impl.h" @@ -128,7 +128,7 @@ class SavePackageTest : public RenderViewHostImplTestHarness { // SavePackage for failed generating file name. scoped_refptr save_package_fail_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; DISALLOW_COPY_AND_ASSIGN(SavePackageTest); }; diff --git a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc index f1d7e4ba35eb8f..ac70f9a7c21cb1 100644 --- a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc +++ b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc @@ -7,9 +7,9 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "content/browser/browser_thread_impl.h" #include "content/browser/in_process_webkit/indexed_db_context_impl.h" #include "content/browser/in_process_webkit/indexed_db_quota_client.h" @@ -157,7 +157,7 @@ class IndexedDBQuotaClientTest : public testing::Test { delete_status_ = code; } - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; int64 usage_; std::set origins_; quota::StorageType type_; diff --git a/content/browser/in_process_webkit/indexed_db_unittest.cc b/content/browser/in_process_webkit/indexed_db_unittest.cc index 08af7da56da441..a15c4b2ac4d35f 100644 --- a/content/browser/in_process_webkit/indexed_db_unittest.cc +++ b/content/browser/in_process_webkit/indexed_db_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/browser/browser_thread_impl.h" #include "content/browser/in_process_webkit/indexed_db_context_impl.h" #include "content/public/browser/storage_partition.h" @@ -39,7 +39,7 @@ class IndexedDBTest : public testing::Test { }; TEST_F(IndexedDBTest, ClearSessionOnlyDatabases) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath normal_path; @@ -83,7 +83,7 @@ TEST_F(IndexedDBTest, ClearSessionOnlyDatabases) { } TEST_F(IndexedDBTest, SetForceKeepSessionState) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath normal_path; @@ -156,7 +156,7 @@ class MockWebIDBDatabase : public WebKit::WebIDBDatabase TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath test_path; diff --git a/content/browser/trace_subscriber_stdio_unittest.cc b/content/browser/trace_subscriber_stdio_unittest.cc index 22429e83d56eeb..49cb4a6659f6e4 100644 --- a/content/browser/trace_subscriber_stdio_unittest.cc +++ b/content/browser/trace_subscriber_stdio_unittest.cc @@ -4,7 +4,7 @@ #include "content/browser/trace_subscriber_stdio.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/threading/sequenced_worker_pool.h" #include "content/public/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -14,7 +14,7 @@ namespace content { class TraceSubscriberStdioTest : public ::testing::Test {}; TEST_F(TraceSubscriberStdioTest, CanWriteDataToFile) { - ScopedTempDir trace_dir; + base::ScopedTempDir trace_dir; ASSERT_TRUE(trace_dir.CreateUniqueTempDir()); FilePath trace_file(trace_dir.path().AppendASCII("trace.txt")); { diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h index d86dff53564cda..64817a51f1f77a 100644 --- a/content/public/test/browser_test_utils.h +++ b/content/public/test/browser_test_utils.h @@ -11,9 +11,9 @@ #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/process.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/content/public/test/test_browser_context.h b/content/public/test/test_browser_context.h index 9efcf941537756..5a93376055559b 100644 --- a/content/public/test/test_browser_context.h +++ b/content/public/test/test_browser_context.h @@ -7,10 +7,10 @@ #include "base/compiler_specific.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "content/public/browser/browser_context.h" namespace content { @@ -56,7 +56,7 @@ class TestBrowserContext : public BrowserContext { scoped_refptr request_context_; scoped_ptr resource_context_; - ScopedTempDir browser_context_dir_; + base::ScopedTempDir browser_context_dir_; scoped_refptr special_storage_policy_; DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc index 2b2596070d27bb..e1248296f3a9ea 100644 --- a/content/public/test/test_launcher.cc +++ b/content/public/test/test_launcher.cc @@ -10,12 +10,12 @@ #include "base/command_line.h" #include "base/environment.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/hash_tables.h" #include "base/logging.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/test/test_suite.h" @@ -448,7 +448,7 @@ int RunTest(TestLauncherDelegate* launcher_delegate, // failure status back to the parent. new_cmd_line.AppendSwitch(base::TestSuite::kStrictFailureHandling); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; // Create a new data dir and pass it to the child. if (!temp_dir.CreateUniqueTempDir() || !temp_dir.IsValid()) { LOG(ERROR) << "Error creating temp data directory"; diff --git a/content/shell/shell_browser_context.h b/content/shell/shell_browser_context.h index 721d007e8cda24..8805e3de83fa11 100644 --- a/content/shell/shell_browser_context.h +++ b/content/shell/shell_browser_context.h @@ -7,9 +7,9 @@ #include "base/compiler_specific.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "content/public/browser/browser_context.h" namespace content { @@ -54,7 +54,7 @@ class ShellBrowserContext : public BrowserContext { bool off_the_record_; bool ignore_certificate_errors_; - ScopedTempDir testing_path_; + base::ScopedTempDir testing_path_; FilePath path_; scoped_ptr resource_context_; scoped_refptr download_manager_delegate_; diff --git a/content/test/layout_browsertest.cc b/content/test/layout_browsertest.cc index c3bf9abe41d89d..90132fb5d5d36a 100644 --- a/content/test/layout_browsertest.cc +++ b/content/test/layout_browsertest.cc @@ -9,12 +9,12 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/rand_util.h" #include "base/run_loop.h" -#include "base/scoped_temp_dir.h" -#include "base/stringprintf.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/common/content_paths.h" diff --git a/content/test/layout_browsertest.h b/content/test/layout_browsertest.h index 0f05ab06ac0edd..583bac2a401aed 100644 --- a/content/test/layout_browsertest.h +++ b/content/test/layout_browsertest.h @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/test/content_browser_test.h" class GURL; diff --git a/content/test/test_content_browser_client.h b/content/test/test_content_browser_client.h index 4a6435b89440ed..27089042381734 100644 --- a/content/test/test_content_browser_client.h +++ b/content/test/test_content_browser_client.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "content/public/browser/content_browser_client.h" namespace content { @@ -27,7 +27,7 @@ class TestContentBrowserClient : public ContentBrowserClient { private: // Temporary directory for GetDefaultDownloadDirectory. - ScopedTempDir download_dir_; + base::ScopedTempDir download_dir_; DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); }; diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 26626e7f7d5c58..dac0e223501ddc 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -6,11 +6,11 @@ #include "crypto/nss_util_internal.h" #include +#include #include #include #include #include -#include #include #if defined(OS_LINUX) @@ -27,11 +27,11 @@ #include "base/environment.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/native_library.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/threading/thread_restrictions.h" #include "build/build_config.h" @@ -223,7 +223,8 @@ base::LazyInstance::Leaky // This is a LazyInstance so that it will be deleted automatically when the // unittest exits. NSSInitSingleton is a LeakySingleton, so it would not be // deleted if it were a regular member. -base::LazyInstance g_test_nss_db_dir = LAZY_INSTANCE_INITIALIZER; +base::LazyInstance g_test_nss_db_dir = + LAZY_INSTANCE_INITIALIZER; // Force a crash to debug http://crbug.com/153281. void CrashWithErrors(int nss_error, int os_error) { diff --git a/net/base/directory_lister_unittest.cc b/net/base/directory_lister_unittest.cc index 7f82a66a2b95f7..7a34e65a1fc27f 100644 --- a/net/base/directory_lister_unittest.cc +++ b/net/base/directory_lister_unittest.cc @@ -4,11 +4,11 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/file_util_icu.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "net/base/directory_lister.h" #include "net/base/net_errors.h" #include "testing/gtest/include/gtest/gtest.h" @@ -132,7 +132,7 @@ TEST(DirectoryListerTest, CancelTest) { } TEST(DirectoryListerTest, EmptyDirTest) { - ScopedTempDir tempDir; + base::ScopedTempDir tempDir; EXPECT_TRUE(tempDir.CreateUniqueTempDir()); bool kRecursive = false; diff --git a/net/base/upload_data_stream_unittest.cc b/net/base/upload_data_stream_unittest.cc index 950511de180cbe..0960c30f00bfcc 100644 --- a/net/base/upload_data_stream_unittest.cc +++ b/net/base/upload_data_stream_unittest.cc @@ -11,9 +11,9 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" @@ -138,7 +138,7 @@ class UploadDataStreamTest : public PlatformTest { const base::Time& time, bool error_expected); - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr upload_data_; }; diff --git a/net/base/upload_file_element_reader_unittest.cc b/net/base/upload_file_element_reader_unittest.cc index f8a9c34f8db049..f43aad13529ff1 100644 --- a/net/base/upload_file_element_reader_unittest.cc +++ b/net/base/upload_file_element_reader_unittest.cc @@ -5,7 +5,7 @@ #include "net/base/upload_file_element_reader.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" @@ -39,7 +39,7 @@ class UploadFileElementReaderTest : public PlatformTest { std::vector bytes_; scoped_ptr reader_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath temp_file_path_; }; diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 6c59733afa570b..2ec657e94ab06c 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc @@ -2356,7 +2356,7 @@ TEST_F(DiskCacheBackendTest, NewEvictionDoomAll2) { // We should be able to create the same entry on multiple simultaneous instances // of the cache. TEST_F(DiskCacheTest, MultipleInstances) { - ScopedTempDir store1, store2; + base::ScopedTempDir store1, store2; ASSERT_TRUE(store1.CreateUniqueTempDir()); ASSERT_TRUE(store2.CreateUniqueTempDir()); diff --git a/net/disk_cache/cache_util_unittest.cc b/net/disk_cache/cache_util_unittest.cc index 884a81c1596234..919df7bf487988 100644 --- a/net/disk_cache/cache_util_unittest.cc +++ b/net/disk_cache/cache_util_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "net/disk_cache/cache_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -34,7 +34,7 @@ class CacheUtilTest : public PlatformTest { } protected: - ScopedTempDir tmp_dir_; + base::ScopedTempDir tmp_dir_; FilePath cache_dir_; FilePath file1_; FilePath file2_; diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h index 03a9a72e350ec3..c5442a44152813 100644 --- a/net/disk_cache/disk_cache_test_base.h +++ b/net/disk_cache/disk_cache_test_base.h @@ -7,8 +7,8 @@ #include "base/basictypes.h" #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/threading/thread.h" #include "net/base/cache_type.h" #include "testing/gtest/include/gtest/gtest.h" @@ -49,7 +49,7 @@ class DiskCacheTest : public PlatformTest { FilePath cache_path_; private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_ptr message_loop_; }; diff --git a/net/disk_cache/flash/flash_cache_test_base.cc b/net/disk_cache/flash/flash_cache_test_base.cc index ff0de12abba3b4..0123e16d9ba2fd 100644 --- a/net/disk_cache/flash/flash_cache_test_base.cc +++ b/net/disk_cache/flash/flash_cache_test_base.cc @@ -5,7 +5,7 @@ #include "net/disk_cache/flash/flash_cache_test_base.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/time.h" #include "net/disk_cache/flash/format.h" #include "net/disk_cache/flash/log_structured_store.h" diff --git a/net/disk_cache/flash/flash_cache_test_base.h b/net/disk_cache/flash/flash_cache_test_base.h index 34cbc438161a27..cd6e54fd78f07e 100644 --- a/net/disk_cache/flash/flash_cache_test_base.h +++ b/net/disk_cache/flash/flash_cache_test_base.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +28,7 @@ class FlashCacheTest : public testing::Test { scoped_ptr log_structured_store_; scoped_ptr storage_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; int32 num_segments_in_storage_; private: diff --git a/net/disk_cache/flash/storage_unittest.cc b/net/disk_cache/flash/storage_unittest.cc index 2bacb11ec6100f..d76b21d4831268 100644 --- a/net/disk_cache/flash/storage_unittest.cc +++ b/net/disk_cache/flash/storage_unittest.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include "base/file_path.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "net/base/io_buffer.h" #include "net/disk_cache/disk_cache_test_util.h" -#include "net/disk_cache/flash/storage.h" #include "net/disk_cache/flash/flash_cache_test_base.h" +#include "net/disk_cache/flash/storage.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc index bfe2d46afa300e..b609c47e6e08ec 100644 --- a/net/http/http_stream_parser_unittest.cc +++ b/net/http/http_stream_parser_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "base/stringprintf.h" #include "googleurl/src/gurl.h" @@ -120,7 +120,7 @@ TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_FileBody) { scoped_refptr upload_data = new UploadData; // Create an empty temporary file. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath temp_file_path; ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_dir.path(), diff --git a/net/http/infinite_cache_unittest.cc b/net/http/infinite_cache_unittest.cc index 707f248a203d75..813adbcdbba8bb 100644 --- a/net/http/infinite_cache_unittest.cc +++ b/net/http/infinite_cache_unittest.cc @@ -5,7 +5,7 @@ #include "net/http/infinite_cache.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/threading/platform_thread.h" #include "base/time.h" #include "net/base/net_errors.h" @@ -113,7 +113,7 @@ TEST(InfiniteCache, Basics) { } TEST(InfiniteCache, Save_Restore) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath path = dir.path().Append(FILE_PATH_LITERAL("infinite")); @@ -165,7 +165,7 @@ TEST(InfiniteCache, DoomMethod) { } TEST(InfiniteCache, Delete) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath path = dir.path().Append(FILE_PATH_LITERAL("infinite")); @@ -191,7 +191,7 @@ TEST(InfiniteCache, Delete) { TEST(InfiniteCache, DeleteBetween) { #if !defined(OS_ANDROID) - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath path = dir.path().Append(FILE_PATH_LITERAL("infinite")); diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc index 6beb93cdbd5581..995d98e7a6f54a 100644 --- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc +++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc @@ -10,8 +10,8 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_vector.h" -#include "base/scoped_temp_dir.h" #include "net/base/auth.h" #include "net/base/net_log_unittest.h" #include "net/base/upload_data.h" @@ -577,7 +577,7 @@ class SpdyNetworkTransactionSpdy2Test HttpRequestInfo google_chunked_post_request_; HttpRequestInfo google_get_push_request_; SpdyTestStateHelper spdy_state_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; //----------------------------------------------------------------------------- diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc index 50ccbb09a779dc..5a9a40ca1d435f 100644 --- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc +++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc @@ -10,8 +10,8 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_vector.h" -#include "base/scoped_temp_dir.h" #include "net/base/auth.h" #include "net/base/net_log_unittest.h" #include "net/base/upload_data.h" @@ -578,7 +578,7 @@ class SpdyNetworkTransactionSpdy3Test HttpRequestInfo google_chunked_post_request_; HttpRequestInfo google_get_push_request_; SpdyTestStateHelper spdy_state_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; //----------------------------------------------------------------------------- diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc index 9a231bb2d48be7..f3f06595321c45 100644 --- a/net/url_request/url_fetcher_impl_unittest.cc +++ b/net/url_request/url_fetcher_impl_unittest.cc @@ -8,8 +8,8 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" #include "build/build_config.h" @@ -1082,7 +1082,7 @@ TEST_F(URLFetcherFileTest, SmallGet) { FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Get a small file. @@ -1104,7 +1104,7 @@ TEST_F(URLFetcherFileTest, LargeGet) { FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Get a file large enough to require more than one read into @@ -1124,7 +1124,7 @@ TEST_F(URLFetcherFileTest, CanTakeOwnershipOfFile) { FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Get a small file. @@ -1148,7 +1148,7 @@ TEST_F(URLFetcherFileTest, OverwriteExistingFile) { FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Create a file before trying to fetch. @@ -1175,7 +1175,7 @@ TEST_F(URLFetcherFileTest, TryToOverwriteDirectory) { FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Create a directory before trying to fetch. diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc index ac30fd0c4b5925..2da118ce23ab75 100644 --- a/printing/emf_win_unittest.cc +++ b/printing/emf_win_unittest.cc @@ -13,9 +13,9 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/win/scoped_hdc.h" #include "printing/printing_context.h" #include "testing/gtest/include/gtest/gtest.h" @@ -169,7 +169,7 @@ TEST_F(EmfPrintingTest, PageBreak) { TEST(EmfTest, FileBackedEmf) { // Simplest use case. - ScopedTempDir scratch_metafile_dir; + base::ScopedTempDir scratch_metafile_dir; ASSERT_TRUE(scratch_metafile_dir.CreateUniqueTempDir()); FilePath metafile_path; EXPECT_TRUE(file_util::CreateTemporaryFileInDir(scratch_metafile_dir.path(), diff --git a/remoting/host/host_key_pair_unittest.cc b/remoting/host/host_key_pair_unittest.cc index a90c1baaff49bd..f19674f2ca5c82 100644 --- a/remoting/host/host_key_pair_unittest.cc +++ b/remoting/host/host_key_pair_unittest.cc @@ -4,10 +4,10 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "remoting/host/host_key_pair.h" #include "remoting/host/json_host_config.h" @@ -38,7 +38,7 @@ class HostKeyPairTest : public testing::Test { } MessageLoop message_loop_; - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; scoped_ptr config_; }; diff --git a/remoting/host/json_host_config_unittest.cc b/remoting/host/json_host_config_unittest.cc index dd318ae2e5ca01..4aedf3df216a10 100644 --- a/remoting/host/json_host_config_unittest.cc +++ b/remoting/host/json_host_config_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "remoting/host/json_host_config.h" #include "testing/gtest/include/gtest/gtest.h" @@ -29,7 +29,7 @@ class JsonHostConfigTest : public testing::Test { } // The temporary directory used to contain the test operations. - ScopedTempDir test_dir_; + base::ScopedTempDir test_dir_; }; TEST_F(JsonHostConfigTest, InvalidFile) { diff --git a/rlz/test/rlz_test_helpers.h b/rlz/test/rlz_test_helpers.h index 6ca606db4581c2..8b0565d9ec17c3 100644 --- a/rlz/test/rlz_test_helpers.h +++ b/rlz/test/rlz_test_helpers.h @@ -11,7 +11,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_MACOSX) || defined(OS_CHROMEOS) -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #endif #if defined(OS_CHROMEOS) #include "base/message_loop.h" @@ -28,7 +28,7 @@ class RlzLibTestNoMachineState : public ::testing::Test { #if defined(OS_MACOSX) || defined(OS_CHROMEOS) - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; #endif #if defined(OS_CHROMEOS) base::Thread pref_store_io_thread_; diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc index 80364096133df8..e8f454fa13493a 100644 --- a/sql/connection_unittest.cc +++ b/sql/connection_unittest.cc @@ -3,10 +3,10 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "sql/connection.h" -#include "sql/statement.h" #include "sql/meta_table.h" +#include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/sqlite/sqlite3.h" @@ -30,7 +30,7 @@ class SQLConnectionTest : public testing::Test { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; }; diff --git a/sql/sqlite_features_unittest.cc b/sql/sqlite_features_unittest.cc index 7e750e97c6bc4d..0dc2deadee91cf 100644 --- a/sql/sqlite_features_unittest.cc +++ b/sql/sqlite_features_unittest.cc @@ -5,7 +5,7 @@ #include #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "sql/connection.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" @@ -65,7 +65,7 @@ class SQLiteFeaturesTest : public testing::Test { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; // The error code of the most recent error. diff --git a/sql/statement_unittest.cc b/sql/statement_unittest.cc index a7a23d82949210..b590622a03ae33 100644 --- a/sql/statement_unittest.cc +++ b/sql/statement_unittest.cc @@ -5,7 +5,7 @@ #include #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "sql/connection.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" @@ -65,7 +65,7 @@ class SQLStatementTest : public testing::Test { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; // The error code of the most recent error. diff --git a/sql/transaction_unittest.cc b/sql/transaction_unittest.cc index f306a5cb6ef193..8b2abc31498a05 100644 --- a/sql/transaction_unittest.cc +++ b/sql/transaction_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "sql/connection.h" #include "sql/statement.h" #include "sql/transaction.h" @@ -36,7 +36,7 @@ class SQLTransactionTest : public testing::Test { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; sql::Connection db_; }; diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index c60a4d48108ebb..13a055678a5ae6 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -12,12 +12,12 @@ #include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/location.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/stringprintf.h" #include "base/test/values_test_util.h" @@ -1025,7 +1025,7 @@ class SyncManagerTest : public testing::Test, // Needed by |sync_manager_|. MessageLoop message_loop_; // Needed by |sync_manager_|. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // Sync Id's for the roots of the enabled datatypes. std::map type_roots_; FakeExtensionsActivityMonitor extensions_activity_monitor_; diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc index f7be92062e94b3..0cb0044acc6048 100644 --- a/sync/syncable/directory_backing_store_unittest.cc +++ b/sync/syncable/directory_backing_store_unittest.cc @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "sql/connection.h" @@ -79,7 +79,7 @@ class MigrationTest : public testing::TestWithParam { } private: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; class DirectoryBackingStoreTest : public MigrationTest {}; diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index 8a49ba44968faa..2a089ac3e3eb86 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -8,11 +8,11 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/stringprintf.h" #include "base/synchronization/condition_variable.h" #include "base/test/values_test_util.h" @@ -98,7 +98,7 @@ class SyncableGeneralTest : public testing::Test { } protected: MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; NullDirectoryChangeDelegate delegate_; FakeEncryptor encryptor_; TestUnrecoverableErrorHandler handler_; @@ -1483,7 +1483,7 @@ TestDirectory::~TestDirectory() { } TEST(OnDiskSyncableDirectory, FailInitialWrite) { FakeEncryptor encryptor; TestUnrecoverableErrorHandler handler; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.path().Append( FILE_PATH_LITERAL("Test.sqlite3")); @@ -1539,7 +1539,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest { } TestDirectory *test_directory_; // mirrors scoped_ptr dir_ - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath file_path_; }; @@ -1942,7 +1942,7 @@ class SyncableDirectoryManagement : public testing::Test { } protected: MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FakeEncryptor encryptor_; TestUnrecoverableErrorHandler handler_; NullDirectoryChangeDelegate delegate_; @@ -2011,7 +2011,7 @@ class StressTransactionsDelegate : public base::PlatformThread::Delegate { TEST(SyncableDirectory, StressTransactions) { MessageLoop message_loop; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FakeEncryptor encryptor; TestUnrecoverableErrorHandler handler; diff --git a/sync/tools/sync_client.cc b/sync/tools/sync_client.cc index f49e59e313d7b9..a7ff43864f561f 100644 --- a/sync/tools/sync_client.cc +++ b/sync/tools/sync_client.cc @@ -11,13 +11,13 @@ #include "base/command_line.h" #include "base/compiler_specific.h" #include "base/debug/stack_trace.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_writer.h" #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/task_runner.h" #include "base/threading/thread.h" #include "jingle/notifier/base/notification_method.h" @@ -41,8 +41,8 @@ #include "sync/js/js_event_details.h" #include "sync/js/js_event_handler.h" #include "sync/notifier/invalidation_state_tracker.h" -#include "sync/notifier/invalidator_factory.h" #include "sync/notifier/invalidator.h" +#include "sync/notifier/invalidator_factory.h" #include "sync/test/fake_encryptor.h" #if defined(OS_MACOSX) @@ -317,7 +317,7 @@ int SyncClientMain(int argc, char* argv[]) { null_invalidation_state_tracker.AsWeakPtr()); // Set up database directory for the syncer. - ScopedTempDir database_dir; + base::ScopedTempDir database_dir; CHECK(database_dir.CreateUniqueTempDir()); // Set up model type parameters. diff --git a/ui/base/resource/data_pack_unittest.cc b/ui/base/resource/data_pack_unittest.cc index 7ace1ba84ee410..ed3d6d77864327 100644 --- a/ui/base/resource/data_pack_unittest.cc +++ b/ui/base/resource/data_pack_unittest.cc @@ -4,8 +4,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/data_pack.h" @@ -22,7 +22,7 @@ extern const char kSamplePakContents[]; extern const size_t kSamplePakSize; TEST(DataPackTest, LoadFromPath) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak")); @@ -54,7 +54,7 @@ TEST(DataPackTest, LoadFromPath) { } TEST(DataPackTest, LoadFromFile) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak")); @@ -111,7 +111,7 @@ TEST(DataPackTest, LoadFileWithTruncatedHeader) { } TEST_P(DataPackTest, Write) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); FilePath file = dir.path().Append(FILE_PATH_LITERAL("data.pak")); diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc index 9478d5ce886840..d2b0108ab4b4e7 100644 --- a/ui/base/resource/resource_bundle_unittest.cc +++ b/ui/base/resource/resource_bundle_unittest.cc @@ -7,10 +7,10 @@ #include "base/base_paths.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/ref_counted_memory.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "net/base/big_endian.h" #include "testing/gmock/include/gmock/gmock.h" @@ -360,7 +360,7 @@ class ResourceBundleImageTest : public ResourceBundleTest { private: scoped_ptr locale_pack_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; DISALLOW_COPY_AND_ASSIGN(ResourceBundleImageTest); }; diff --git a/webkit/appcache/appcache_database_unittest.cc b/webkit/appcache/appcache_database_unittest.cc index 3a9a5ad11b28e9..d84d4518705294 100644 --- a/webkit/appcache/appcache_database_unittest.cc +++ b/webkit/appcache/appcache_database_unittest.cc @@ -5,7 +5,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "base/stringprintf.h" #include "sql/connection.h" #include "sql/meta_table.h" @@ -63,7 +63,7 @@ TEST(AppCacheDatabaseTest, LazyOpen) { TEST(AppCacheDatabaseTest, ReCreate) { // Real files on disk for this test. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath kDbFile = temp_dir.path().AppendASCII("appcache.db"); const FilePath kNestedDir = temp_dir.path().AppendASCII("nested"); @@ -619,7 +619,7 @@ TEST(AppCacheDatabaseTest, OriginUsage) { TEST(AppCacheDatabaseTest, UpgradeSchema3to4) { // Real file on disk for this test. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath kDbFile = temp_dir.path().AppendASCII("upgrade.db"); diff --git a/webkit/blob/blob_url_request_job_unittest.cc b/webkit/blob/blob_url_request_job_unittest.cc index 1141714dd3d97d..a9b2241c0b7a0c 100644 --- a/webkit/blob/blob_url_request_job_unittest.cc +++ b/webkit/blob/blob_url_request_job_unittest.cc @@ -5,10 +5,10 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "net/base/io_buffer.h" #include "net/http/http_request_headers.h" @@ -295,7 +295,7 @@ class BlobURLRequestJobTest : public testing::Test { } protected: - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; FilePath temp_file1_; FilePath temp_file2_; base::Time temp_file_modification_time1_; diff --git a/webkit/blob/local_file_stream_reader_unittest.cc b/webkit/blob/local_file_stream_reader_unittest.cc index 4087037ba80ec5..9c2a228d8a25b1 100644 --- a/webkit/blob/local_file_stream_reader_unittest.cc +++ b/webkit/blob/local_file_stream_reader_unittest.cc @@ -8,10 +8,10 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/threading/thread.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" @@ -118,7 +118,7 @@ class LocalFileStreamReaderTest : public testing::Test { private: MessageLoop message_loop_; base::Thread file_thread_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; base::Time test_file_modification_time_; }; diff --git a/webkit/blob/shareable_file_reference_unittest.cc b/webkit/blob/shareable_file_reference_unittest.cc index 6234f429f9ea6f..7136fcd55c4f19 100644 --- a/webkit/blob/shareable_file_reference_unittest.cc +++ b/webkit/blob/shareable_file_reference_unittest.cc @@ -5,9 +5,9 @@ #include "webkit/blob/shareable_file_reference.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" namespace webkit_blob { @@ -16,7 +16,7 @@ TEST(ShareableFileReferenceTest, TestReferences) { MessageLoop message_loop; scoped_refptr loop_proxy = base::MessageLoopProxy::current(); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Create a file. diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc index 303dbd84f9caaf..ef95d8f2aa6f0e 100644 --- a/webkit/database/database_tracker_unittest.cc +++ b/webkit/database/database_tracker_unittest.cc @@ -4,11 +4,11 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "net/base/net_errors.h" @@ -187,7 +187,7 @@ class DatabaseTracker_TestHelper_Test { public: static void TestDeleteOpenDatabase(bool incognito_mode) { // Initialize the tracker database. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr special_storage_policy = new quota::MockSpecialStoragePolicy; @@ -292,7 +292,7 @@ class DatabaseTracker_TestHelper_Test { static void TestDatabaseTracker(bool incognito_mode) { // Initialize the tracker database. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr special_storage_policy = new quota::MockSpecialStoragePolicy; @@ -441,7 +441,7 @@ class DatabaseTracker_TestHelper_Test { const string16 kName = ASCIIToUTF16("name"); const string16 kDescription = ASCIIToUTF16("description"); - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); // Initialize the tracker with a QuotaManagerProxy @@ -541,7 +541,7 @@ class DatabaseTracker_TestHelper_Test { // Initialize the tracker database. MessageLoop message_loop; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath origin1_db_dir; FilePath origin2_db_dir; @@ -619,7 +619,7 @@ class DatabaseTracker_TestHelper_Test { // Initialize the tracker database. MessageLoop message_loop; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath origin1_db_dir; FilePath origin2_db_dir; @@ -692,7 +692,7 @@ class DatabaseTracker_TestHelper_Test { // Initialize a tracker database, no need to put it on disk. const bool kUseInMemoryTrackerDatabase = true; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr tracker( new DatabaseTracker(temp_dir.path(), kUseInMemoryTrackerDatabase, @@ -738,7 +738,7 @@ class DatabaseTracker_TestHelper_Test { // Initialize a tracker database, no need to put it on disk. const bool kUseInMemoryTrackerDatabase = true; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr tracker( new DatabaseTracker(temp_dir.path(), kUseInMemoryTrackerDatabase, diff --git a/webkit/dom_storage/dom_storage_area_unittest.cc b/webkit/dom_storage/dom_storage_area_unittest.cc index 5d2e953bd41b51..858176a89ab704 100644 --- a/webkit/dom_storage/dom_storage_area_unittest.cc +++ b/webkit/dom_storage/dom_storage_area_unittest.cc @@ -4,9 +4,9 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/threading/sequenced_worker_pool.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -124,7 +124,7 @@ TEST_F(DomStorageAreaTest, DomStorageAreaBasics) { TEST_F(DomStorageAreaTest, BackingDatabaseOpened) { const int64 kSessionStorageNamespaceId = kLocalStorageNamespaceId + 1; - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); const FilePath kExpectedOriginFilePath = temp_dir.path().Append( DomStorageArea::DatabaseFileNameFromOrigin(kOrigin)); @@ -202,7 +202,7 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) { } TEST_F(DomStorageAreaTest, CommitTasks) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr area( @@ -280,7 +280,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) { } TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr area( new DomStorageArea(kOrigin, @@ -307,7 +307,7 @@ TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) { } TEST_F(DomStorageAreaTest, DeleteOrigin) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr area( new DomStorageArea(kOrigin, @@ -368,7 +368,7 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) { } TEST_F(DomStorageAreaTest, PurgeMemory) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); scoped_refptr area( new DomStorageArea(kOrigin, diff --git a/webkit/dom_storage/dom_storage_context_unittest.cc b/webkit/dom_storage/dom_storage_context_unittest.cc index 870513db64651f..5481f43e806b8d 100644 --- a/webkit/dom_storage/dom_storage_context_unittest.cc +++ b/webkit/dom_storage/dom_storage_context_unittest.cc @@ -4,9 +4,9 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/threading/sequenced_worker_pool.h" #include "base/time.h" #include "base/utf_string_conversions.h" @@ -63,7 +63,7 @@ class DomStorageContextTest : public testing::Test { protected: MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr storage_policy_; scoped_refptr task_runner_; scoped_refptr context_; diff --git a/webkit/dom_storage/dom_storage_database_unittest.cc b/webkit/dom_storage/dom_storage_database_unittest.cc index b11ea89201ba93..3e9bfbddf997c2 100644 --- a/webkit/dom_storage/dom_storage_database_unittest.cc +++ b/webkit/dom_storage/dom_storage_database_unittest.cc @@ -6,8 +6,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" @@ -108,7 +108,7 @@ TEST(DomStorageDatabaseTest, SimpleOpenAndClose) { } TEST(DomStorageDatabaseTest, CloseEmptyDatabaseDeletesFile) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db"); ValuesMap storage; @@ -165,7 +165,7 @@ TEST(DomStorageDatabaseTest, CloseEmptyDatabaseDeletesFile) { TEST(DomStorageDatabaseTest, TestLazyOpenIsLazy) { // This test needs to operate with a file on disk to ensure that we will // open a file that already exists when only invoking ReadAllValues. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db"); @@ -212,7 +212,7 @@ TEST(DomStorageDatabaseTest, TestLazyOpenUpgradesDatabase) { // can create a table at version 1 and then close it again // so that LazyOpen sees there is work to do (LazyOpen will return // early if the database is already open). - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db"); @@ -332,7 +332,7 @@ TEST(DomStorageDatabaseTest, TestCanOpenAndReadWebCoreDatabase) { TEST(DomStorageDatabaseTest, TestCanOpenFileThatIsNotADatabase) { // Write into the temporary file first. - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db"); diff --git a/webkit/dom_storage/session_storage_database_unittest.cc b/webkit/dom_storage/session_storage_database_unittest.cc index e685f934e05e2c..44c62b50d606a1 100644 --- a/webkit/dom_storage/session_storage_database_unittest.cc +++ b/webkit/dom_storage/session_storage_database_unittest.cc @@ -10,8 +10,8 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" @@ -59,7 +59,7 @@ class SessionStorageDatabaseTest : public testing::Test { const GURL& origin) const; int64 GetMapRefCount(const std::string& map_id) const; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr db_; // Test data. diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc index 0c8b06c8d6d592..3d242055b02955 100644 --- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc +++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc @@ -7,11 +7,11 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "base/utf_string_conversions.h" #include "net/base/net_errors.h" @@ -212,7 +212,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test { // leaks caused by tasks posted during shutdown. MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; net::URLRequestContext empty_context_; scoped_ptr delegate_; scoped_ptr request_; diff --git a/webkit/fileapi/file_system_directory_database_unittest.cc b/webkit/fileapi/file_system_directory_database_unittest.cc index ab708fd9724872..d5c31ae3bc920a 100644 --- a/webkit/fileapi/file_system_directory_database_unittest.cc +++ b/webkit/fileapi/file_system_directory_database_unittest.cc @@ -8,9 +8,9 @@ #include #include "base/file_util.h" -#include "base/platform_file.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/scoped_temp_dir.h" +#include "base/platform_file.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -137,7 +137,7 @@ class FileSystemDirectoryDatabaseTest : public testing::Test { protected: // Common temp base for nondestructive uses. - ScopedTempDir base_; + base::ScopedTempDir base_; scoped_ptr db_; DISALLOW_COPY_AND_ASSIGN(FileSystemDirectoryDatabaseTest); diff --git a/webkit/fileapi/file_system_file_stream_reader_unittest.cc b/webkit/fileapi/file_system_file_stream_reader_unittest.cc index f95a1d52a5ef08..c2de0cd38adb61 100644 --- a/webkit/fileapi/file_system_file_stream_reader_unittest.cc +++ b/webkit/fileapi/file_system_file_stream_reader_unittest.cc @@ -7,10 +7,10 @@ #include #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" @@ -151,7 +151,7 @@ class FileSystemFileStreamReaderTest : public testing::Test { } MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr special_storage_policy_; scoped_refptr file_system_context_; base::Time test_file_modification_time_; diff --git a/webkit/fileapi/file_system_file_util_unittest.cc b/webkit/fileapi/file_system_file_util_unittest.cc index e0bbb66f566768..7e45cef57b6e68 100644 --- a/webkit/fileapi/file_system_file_util_unittest.cc +++ b/webkit/fileapi/file_system_file_util_unittest.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation_context.h" @@ -49,7 +49,7 @@ class FileSystemFileUtilTest : public testing::Test { const GURL& src_origin, fileapi::FileSystemType src_type, const GURL& dest_origin, fileapi::FileSystemType dest_type, bool copy) { - ScopedTempDir base_dir; + base::ScopedTempDir base_dir; ASSERT_TRUE(base_dir.CreateUniqueTempDir()); scoped_ptr file_util( new ObfuscatedFileUtil(base_dir.path())); diff --git a/webkit/fileapi/file_system_mount_point_provider_unittest.cc b/webkit/fileapi/file_system_mount_point_provider_unittest.cc index f9cfb3b3a15391..a09f0903ee3907 100644 --- a/webkit/fileapi/file_system_mount_point_provider_unittest.cc +++ b/webkit/fileapi/file_system_mount_point_provider_unittest.cc @@ -8,12 +8,12 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" @@ -253,7 +253,7 @@ class FileSystemMountPointProviderTest : public testing::Test { } private: - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; base::WeakPtrFactory weak_factory_; diff --git a/webkit/fileapi/file_system_origin_database_unittest.cc b/webkit/fileapi/file_system_origin_database_unittest.cc index 68ad6e33c2c5b3..695bea8d200035 100644 --- a/webkit/fileapi/file_system_origin_database_unittest.cc +++ b/webkit/fileapi/file_system_origin_database_unittest.cc @@ -9,8 +9,8 @@ #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/leveldatabase/src/db/filename.h" @@ -28,7 +28,7 @@ const FilePath::CharType kOriginDatabaseName[] = FILE_PATH_LITERAL("Origins"); } // namespace TEST(FileSystemOriginDatabaseTest, BasicTest) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); EXPECT_FALSE(file_util::PathExists(kFSDir)); @@ -58,7 +58,7 @@ TEST(FileSystemOriginDatabaseTest, BasicTest) { } TEST(FileSystemOriginDatabaseTest, TwoPathTest) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); EXPECT_FALSE(file_util::PathExists(kFSDir)); @@ -86,7 +86,7 @@ TEST(FileSystemOriginDatabaseTest, TwoPathTest) { } TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); EXPECT_FALSE(file_util::PathExists(kFSDir)); @@ -114,7 +114,7 @@ TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) { } TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); EXPECT_FALSE(file_util::PathExists(kFSDir)); @@ -141,7 +141,7 @@ TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) { } TEST(FileSystemOriginDatabaseTest, ListOriginsTest) { - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); EXPECT_FALSE(file_util::PathExists(kFSDir)); @@ -190,7 +190,7 @@ TEST(FileSystemOriginDatabaseTest, DatabaseRecoveryTest) { // After repairing, the origin database should be consistent even when some // entries lost. - ScopedTempDir dir; + base::ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); const FilePath kFSDir = dir.path().Append(kFileSystemDirName); const FilePath kDBDir = kFSDir.Append(kOriginDatabaseName); diff --git a/webkit/fileapi/file_system_quota_client_unittest.cc b/webkit/fileapi/file_system_quota_client_unittest.cc index 1dd308fac8674f..4dc3383c0ed253 100644 --- a/webkit/fileapi/file_system_quota_client_unittest.cc +++ b/webkit/fileapi/file_system_quota_client_unittest.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/bind.h" #include "base/basictypes.h" +#include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" @@ -251,7 +251,7 @@ class FileSystemQuotaClientTest : public testing::Test { deletion_status_ = status; } - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; scoped_refptr file_system_context_; base::WeakPtrFactory weak_factory_; diff --git a/webkit/fileapi/file_system_url_request_job_unittest.cc b/webkit/fileapi/file_system_url_request_job_unittest.cc index 729719475cfbde..b0091dc2275b82 100644 --- a/webkit/fileapi/file_system_url_request_job_unittest.cc +++ b/webkit/fileapi/file_system_url_request_job_unittest.cc @@ -9,13 +9,13 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/platform_file.h" #include "base/rand_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" @@ -197,7 +197,7 @@ class FileSystemURLRequestJobTest : public testing::Test { // Put the message loop at the top, so that it's the last thing deleted. MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; scoped_refptr special_storage_policy_; scoped_refptr file_system_context_; base::WeakPtrFactory weak_factory_; diff --git a/webkit/fileapi/file_system_usage_cache_unittest.cc b/webkit/fileapi/file_system_usage_cache_unittest.cc index 90c6a4ddf9e98b..8662dc87742351 100644 --- a/webkit/fileapi/file_system_usage_cache_unittest.cc +++ b/webkit/fileapi/file_system_usage_cache_unittest.cc @@ -6,7 +6,7 @@ #include "base/basictypes.h" #include "base/file_util.h" -#include "base/scoped_temp_dir.h" +#include "base/files/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" namespace fileapi { @@ -25,7 +25,7 @@ class FileSystemUsageCacheTest : public testing::Test { } private: - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; DISALLOW_COPY_AND_ASSIGN(FileSystemUsageCacheTest); }; diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc index 345f1ee5287737..415c2d97fb319a 100644 --- a/webkit/fileapi/file_writer_delegate_unittest.cc +++ b/webkit/fileapi/file_writer_delegate_unittest.cc @@ -7,8 +7,8 @@ #include "base/basictypes.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "net/base/io_buffer.h" #include "net/url_request/url_request.h" @@ -128,7 +128,7 @@ class FileWriterDelegateTest : public PlatformTest { scoped_ptr result_; LocalFileSystemTestOriginHelper test_helper_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; static const char* content_; }; diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc index c8be5c9c1c618d..9a5b48e6215a63 100644 --- a/webkit/fileapi/isolated_file_util_unittest.cc +++ b/webkit/fileapi/isolated_file_util_unittest.cc @@ -8,10 +8,10 @@ #include #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/time.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" @@ -234,7 +234,7 @@ class IsolatedFileUtilTest : public testing::Test { filesystem_id_ = isolated_context()->RegisterDraggedFileSystem(toplevels); } - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; std::string filesystem_id_; scoped_refptr file_system_context_; diff --git a/webkit/fileapi/local_file_stream_writer_unittest.cc b/webkit/fileapi/local_file_stream_writer_unittest.cc index e26eed9fac3d00..2a7fa6833279bb 100644 --- a/webkit/fileapi/local_file_stream_writer_unittest.cc +++ b/webkit/fileapi/local_file_stream_writer_unittest.cc @@ -8,10 +8,10 @@ #include "base/callback.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" -#include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" +#include "base/message_loop.h" #include "net/base/io_buffer.h" #include "net/base/test_completion_callback.h" #include "testing/gtest/include/gtest/gtest.h" @@ -67,7 +67,7 @@ class LocalFileStreamWriterTest : public testing::Test { private: MessageLoop message_loop_; - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; }; void NeverCalled(int unused) { diff --git a/webkit/fileapi/local_file_system_operation_unittest.cc b/webkit/fileapi/local_file_system_operation_unittest.cc index 6da47188f542b3..1fe046ae5eff3f 100644 --- a/webkit/fileapi/local_file_system_operation_unittest.cc +++ b/webkit/fileapi/local_file_system_operation_unittest.cc @@ -5,11 +5,11 @@ #include "webkit/fileapi/local_file_system_operation.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -22,8 +22,8 @@ #include "webkit/fileapi/file_util_helper.h" #include "webkit/fileapi/local_file_system_test_helper.h" #include "webkit/fileapi/mock_file_change_observer.h" -#include "webkit/quota/quota_manager.h" #include "webkit/quota/mock_quota_manager.h" +#include "webkit/quota/quota_manager.h" using quota::QuotaManager; using quota::QuotaManagerProxy; @@ -71,7 +71,7 @@ class LocalFileSystemOperationTest protected: // Common temp base for nondestructive uses. - ScopedTempDir base_; + base::ScopedTempDir base_; quota::MockQuotaManager* quota_manager() { return static_cast(quota_manager_.get()); diff --git a/webkit/fileapi/local_file_system_operation_write_unittest.cc b/webkit/fileapi/local_file_system_operation_write_unittest.cc index eb51b8baec7038..6ba606dd1296c3 100644 --- a/webkit/fileapi/local_file_system_operation_write_unittest.cc +++ b/webkit/fileapi/local_file_system_operation_write_unittest.cc @@ -4,11 +4,11 @@ #include +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" @@ -152,7 +152,7 @@ class LocalFileSystemOperationWriteTest MessageLoop loop_; - ScopedTempDir dir_; + base::ScopedTempDir dir_; FilePath virtual_path_; // For post-operation status. diff --git a/webkit/fileapi/local_file_system_quota_unittest.cc b/webkit/fileapi/local_file_system_quota_unittest.cc index 0b861d30cc8a94..e848afb3946066 100644 --- a/webkit/fileapi/local_file_system_quota_unittest.cc +++ b/webkit/fileapi/local_file_system_quota_unittest.cc @@ -8,12 +8,12 @@ // 3) the result of QuotaManager::GetUsageAndQuota. #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_usage_cache.h" @@ -162,7 +162,7 @@ class LocalFileSystemQuotaTest LocalFileSystemTestOriginHelper test_helper_; - ScopedTempDir work_dir_; + base::ScopedTempDir work_dir_; MessageLoop message_loop_; scoped_refptr quota_manager_; diff --git a/webkit/fileapi/local_file_util_unittest.cc b/webkit/fileapi/local_file_util_unittest.cc index 5dea51223ace6d..9d290820d67f8a 100644 --- a/webkit/fileapi/local_file_util_unittest.cc +++ b/webkit/fileapi/local_file_util_unittest.cc @@ -5,10 +5,10 @@ #include #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -97,7 +97,7 @@ class LocalFileUtilTest : public testing::Test { private: scoped_ptr local_file_util_; - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; LocalFileSystemTestOriginHelper test_helper_; diff --git a/webkit/fileapi/media/native_media_file_util_unittest.cc b/webkit/fileapi/media/native_media_file_util_unittest.cc index f14c7aa4857eb0..6be9471f075ca9 100644 --- a/webkit/fileapi/media/native_media_file_util_unittest.cc +++ b/webkit/fileapi/media/native_media_file_util_unittest.cc @@ -6,8 +6,8 @@ #include #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" @@ -146,7 +146,7 @@ class NativeMediaFileUtilTest : public testing::Test { private: MessageLoop message_loop_; - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; scoped_refptr file_system_context_; FileSystemFileUtil* file_util_; diff --git a/webkit/fileapi/obfuscated_file_util_unittest.cc b/webkit/fileapi/obfuscated_file_util_unittest.cc index df2ad6642c021f..afb5efde8661d6 100644 --- a/webkit/fileapi/obfuscated_file_util_unittest.cc +++ b/webkit/fileapi/obfuscated_file_util_unittest.cc @@ -9,10 +9,10 @@ #include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/sys_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" @@ -495,7 +495,7 @@ class ObfuscatedFileUtilTest : public testing::Test { } void TestCopyInForeignFileHelper(bool overwrite) { - ScopedTempDir source_dir; + base::ScopedTempDir source_dir; ASSERT_TRUE(source_dir.CreateUniqueTempDir()); FilePath root_file_path = source_dir.path(); FilePath src_file_path = root_file_path.AppendASCII("file_name"); @@ -634,7 +634,7 @@ class ObfuscatedFileUtilTest : public testing::Test { } private: - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; ObfuscatedFileUtil* obfuscated_file_util_; scoped_refptr quota_manager_; @@ -1412,7 +1412,7 @@ TEST_F(ObfuscatedFileUtilTest, TestEnumerator) { } TEST_F(ObfuscatedFileUtilTest, TestMigration) { - ScopedTempDir source_dir; + base::ScopedTempDir source_dir; ASSERT_TRUE(source_dir.CreateUniqueTempDir()); FilePath root_path = source_dir.path().AppendASCII("chrome-pLmnMWXE7NzTFRsn"); ASSERT_TRUE(file_util::CreateDirectory(root_path)); diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc index 20f56c09a052c4..2e4f209c4514e5 100644 --- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc +++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc @@ -10,13 +10,13 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" @@ -59,7 +59,7 @@ class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test { ASSERT_TRUE(file_util::DirectoryExists(target)); } - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; scoped_ptr sandbox_provider_; }; @@ -329,7 +329,7 @@ class SandboxMountPointProviderMigrationTest : public testing::Test { } protected: - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; scoped_refptr file_system_context_; base::WeakPtrFactory weak_factory_; diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.h b/webkit/fileapi/syncable/canned_syncable_file_system.h index 1e5de78660f5e2..783bfa5c4a396c 100644 --- a/webkit/fileapi/syncable/canned_syncable_file_system.h +++ b/webkit/fileapi/syncable/canned_syncable_file_system.h @@ -9,10 +9,10 @@ #include #include "base/callback_forward.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" #include "base/observer_list_threadsafe.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "webkit/fileapi/file_system_types.h" #include "webkit/fileapi/file_system_url.h" #include "webkit/fileapi/file_system_util.h" @@ -181,7 +181,7 @@ class CannedSyncableFileSystem void InitializeSyncStatusObserver(); - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; const std::string service_name_; scoped_refptr quota_manager_; diff --git a/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc b/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc index ce37e6063544d8..cc54e8c7be92cb 100644 --- a/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc +++ b/webkit/fileapi/syncable/local_file_change_tracker_unittest.cc @@ -8,10 +8,10 @@ #include #include "base/basictypes.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/blob/mock_blob_url_request_context.h" diff --git a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc index 58be4310c836e8..a61c141dfa8938 100644 --- a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc +++ b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc @@ -467,7 +467,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) { } TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) { - ScopedTempDir temp_dir; + base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); CannedSyncableFileSystem file_system(GURL(kOrigin1), kServiceName, diff --git a/webkit/fileapi/syncable/syncable_file_system_unittest.cc b/webkit/fileapi/syncable/syncable_file_system_unittest.cc index 5d425093af7d69..6accbd00232d53 100644 --- a/webkit/fileapi/syncable/syncable_file_system_unittest.cc +++ b/webkit/fileapi/syncable/syncable_file_system_unittest.cc @@ -81,7 +81,7 @@ class SyncableFileSystemTest : public testing::Test { return file_system_context()->change_tracker(); } - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; MessageLoop message_loop_; CannedSyncableFileSystem file_system_; diff --git a/webkit/plugins/ppapi/quota_file_io_unittest.cc b/webkit/plugins/ppapi/quota_file_io_unittest.cc index aba1660c4565eb..4a60db2c8fb136 100644 --- a/webkit/plugins/ppapi/quota_file_io_unittest.cc +++ b/webkit/plugins/ppapi/quota_file_io_unittest.cc @@ -8,10 +8,10 @@ #include "base/basictypes.h" #include "base/bind.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "webkit/plugins/ppapi/mock_plugin_delegate.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" #include "webkit/plugins/ppapi/ppapi_unittest.h" @@ -422,7 +422,7 @@ class QuotaFileIOTest : public PpapiUnittest { } private: - ScopedTempDir dir_; + base::ScopedTempDir dir_; PlatformFile file_; scoped_ptr quota_file_io_; std::deque bytes_written_; diff --git a/webkit/quota/mock_quota_manager_unittest.cc b/webkit/quota/mock_quota_manager_unittest.cc index c60690224e254a..edd66423365a4a 100644 --- a/webkit/quota/mock_quota_manager_unittest.cc +++ b/webkit/quota/mock_quota_manager_unittest.cc @@ -7,10 +7,10 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/quota/mock_quota_manager.h" #include "webkit/quota/mock_special_storage_policy.h" @@ -99,7 +99,7 @@ class MockQuotaManagerTest : public testing::Test { private: MessageLoop message_loop_; - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; base::WeakPtrFactory weak_factory_; scoped_refptr manager_; scoped_refptr policy_; diff --git a/webkit/quota/quota_database_unittest.cc b/webkit/quota/quota_database_unittest.cc index 1e3e5628542886..40e671c03a0a05 100644 --- a/webkit/quota/quota_database_unittest.cc +++ b/webkit/quota/quota_database_unittest.cc @@ -9,8 +9,8 @@ #include "base/bind.h" #include "base/callback.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" -#include "base/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "sql/connection.h" #include "sql/meta_table.h" @@ -493,7 +493,7 @@ class QuotaDatabaseTest : public testing::Test { }; TEST_F(QuotaDatabaseTest, LazyOpen) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); LazyOpen(kDbFile); @@ -501,14 +501,14 @@ TEST_F(QuotaDatabaseTest, LazyOpen) { } TEST_F(QuotaDatabaseTest, UpgradeSchema) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); UpgradeSchemaV2toV3(kDbFile); } TEST_F(QuotaDatabaseTest, HostQuota) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); HostQuota(kDbFile); @@ -516,7 +516,7 @@ TEST_F(QuotaDatabaseTest, HostQuota) { } TEST_F(QuotaDatabaseTest, GlobalQuota) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); GlobalQuota(kDbFile); @@ -524,7 +524,7 @@ TEST_F(QuotaDatabaseTest, GlobalQuota) { } TEST_F(QuotaDatabaseTest, OriginLastAccessTimeLRU) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); OriginLastAccessTimeLRU(kDbFile); @@ -532,7 +532,7 @@ TEST_F(QuotaDatabaseTest, OriginLastAccessTimeLRU) { } TEST_F(QuotaDatabaseTest, OriginLastModifiedSince) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); OriginLastModifiedSince(kDbFile); @@ -540,7 +540,7 @@ TEST_F(QuotaDatabaseTest, OriginLastModifiedSince) { } TEST_F(QuotaDatabaseTest, BootstrapFlag) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); @@ -554,7 +554,7 @@ TEST_F(QuotaDatabaseTest, BootstrapFlag) { } TEST_F(QuotaDatabaseTest, RegisterInitialOriginInfo) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); RegisterInitialOriginInfo(kDbFile); @@ -562,7 +562,7 @@ TEST_F(QuotaDatabaseTest, RegisterInitialOriginInfo) { } TEST_F(QuotaDatabaseTest, DumpQuotaTable) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); DumpQuotaTable(kDbFile); @@ -570,7 +570,7 @@ TEST_F(QuotaDatabaseTest, DumpQuotaTable) { } TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) { - ScopedTempDir data_dir; + base::ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); DumpOriginInfoTable(kDbFile); diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc index 99e06368aab544..4e056044387e86 100644 --- a/webkit/quota/quota_manager_unittest.cc +++ b/webkit/quota/quota_manager_unittest.cc @@ -8,11 +8,11 @@ #include "base/bind.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "base/scoped_temp_dir.h" #include "base/stl_util.h" #include "base/sys_info.h" #include "base/time.h" @@ -404,7 +404,7 @@ class QuotaManagerTest : public testing::Test { } MessageLoop message_loop_; - ScopedTempDir data_dir_; + base::ScopedTempDir data_dir_; base::WeakPtrFactory weak_factory_; scoped_refptr quota_manager_; diff --git a/webkit/support/simple_database_system.h b/webkit/support/simple_database_system.h index f04a5fa2cc78a9..bd92fc2bbd1357 100644 --- a/webkit/support/simple_database_system.h +++ b/webkit/support/simple_database_system.h @@ -6,10 +6,10 @@ #define WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ #include "base/file_path.h" +#include "base/files/scoped_temp_dir.h" #include "base/hash_tables.h" #include "base/memory/ref_counted.h" #include "base/platform_file.h" -#include "base/scoped_temp_dir.h" #include "base/string16.h" #include "base/synchronization/lock.h" #include "base/threading/thread.h" @@ -86,7 +86,7 @@ class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer, void ThreadCleanup(base::WaitableEvent* done_event); // Where the tracker database file and per origin database files reside. - ScopedTempDir temp_dir_; + base::ScopedTempDir temp_dir_; // All access to the db_tracker (except for its construction) and // vfs operations are serialized on a background thread. diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index 7437979f57ae46..c3795768a5a412 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -5,9 +5,9 @@ #include "webkit/support/test_webkit_platform_support.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/metrics/stats_counters.h" #include "base/path_service.h" -#include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "media/base/media.h" @@ -17,9 +17,11 @@ #include "third_party/hyphen/hyphen.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevice.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" @@ -28,8 +30,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "v8/include/v8.h" #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/database/vfs_backend.h" @@ -40,18 +40,18 @@ #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/support/simple_database_system.h" #include "webkit/support/gc_extension.h" +#include "webkit/support/simple_database_system.h" #include "webkit/support/test_webmessageportchannel.h" -#include "webkit/support/webkit_support.h" -#include "webkit/support/weburl_loader_mock_factory.h" #include "webkit/support/web_audio_device_mock.h" #include "webkit/support/web_gesture_curve_mock.h" +#include "webkit/support/webkit_support.h" +#include "webkit/support/weburl_loader_mock_factory.h" #include "webkit/tools/test_shell/mock_webclipboard_impl.h" #include "webkit/tools/test_shell/simple_appcache_system.h" #include "webkit/tools/test_shell/simple_file_system.h" -#include "webkit/tools/test_shell/simple_socket_stream_bridge.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" +#include "webkit/tools/test_shell/simple_socket_stream_bridge.h" #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" #include "webkit/tools/test_shell/test_shell_request_context.h" #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h" @@ -391,7 +391,7 @@ class TestWebIDBFactory : public WebKit::WebIDBFactory { } private: scoped_ptr factory_; - ScopedTempDir indexed_db_dir_; + base::ScopedTempDir indexed_db_dir_; WebString data_dir_; }; diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h index ecf5dcb6704661..a16263d04752c4 100644 --- a/webkit/support/test_webkit_platform_support.h +++ b/webkit/support/test_webkit_platform_support.h @@ -138,14 +138,14 @@ class TestWebKitPlatformSupport : TestShellWebMimeRegistryImpl mime_registry_; MockWebClipboardImpl mock_clipboard_; webkit_glue::WebFileUtilitiesImpl file_utilities_; - ScopedTempDir appcache_dir_; + base::ScopedTempDir appcache_dir_; SimpleAppCacheSystem appcache_system_; SimpleDatabaseSystem database_system_; SimpleDomStorageSystem dom_storage_system_; SimpleWebCookieJarImpl cookie_jar_; scoped_refptr blob_registry_; SimpleFileSystem file_system_; - ScopedTempDir file_system_root_; + base::ScopedTempDir file_system_root_; WebURLLoaderMockFactory url_loader_factory_; bool unit_test_mode_; WebKit::WebGamepads gamepad_data_; diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index f2f6a55f0dcc38..510c50f350ffb1 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -13,6 +13,7 @@ #include "base/debug/stack_trace.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/i18n/icu_util.h" #include "base/logging.h" #include "base/memory/ref_counted.h" @@ -20,7 +21,6 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_temp_dir.h" #include "base/string_piece.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -36,13 +36,13 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" #if defined(TOOLKIT_GTK) #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" #endif @@ -710,7 +710,7 @@ WebURL LocalFileToDataURL(const WebURL& fileUrl) { return WebURL(GURL(kDataUrlPrefix + contents_base64)); } -// A wrapper object for exporting ScopedTempDir to be used +// A wrapper object for exporting base::ScopedTempDir to be used // by webkit layout tests. class ScopedTempDirectoryInternal : public ScopedTempDirectory { public: @@ -723,7 +723,7 @@ class ScopedTempDirectoryInternal : public ScopedTempDirectory { } private: - ScopedTempDir tempDirectory_; + base::ScopedTempDir tempDirectory_; }; ScopedTempDirectory* CreateScopedTempDirectory() { diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h index 18244e29363dd2..b1215eda09d53f 100644 --- a/webkit/support/webkit_support.h +++ b/webkit/support/webkit_support.h @@ -11,11 +11,11 @@ #include "base/string16.h" #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h" #include "ui/base/keycodes/keyboard_codes.h" namespace WebKit { diff --git a/webkit/tools/test_shell/simple_file_system.h b/webkit/tools/test_shell/simple_file_system.h index 548d8dbf916f00..c9867860161178 100644 --- a/webkit/tools/test_shell/simple_file_system.h +++ b/webkit/tools/test_shell/simple_file_system.h @@ -5,15 +5,15 @@ #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ +#include #include "base/file_util_proxy.h" +#include "base/files/scoped_temp_dir.h" #include "base/id_map.h" #include "base/memory/weak_ptr.h" -#include "base/scoped_temp_dir.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_types.h" -#include namespace WebKit { class WebFileSystemCallbacks; @@ -148,7 +148,7 @@ class SimpleFileSystem const scoped_refptr& file_ref); // A temporary directory for FileSystem API. - ScopedTempDir file_system_dir_; + base::ScopedTempDir file_system_dir_; scoped_refptr file_system_context_; diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index a93ef3f1b1da81..58118ab6fa80ec 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -13,13 +13,11 @@ #include "base/basictypes.h" #include "base/file_path.h" -#include "base/scoped_temp_dir.h" -#include "base/string_piece.h" -#if defined(OS_MACOSX) +#include "base/files/scoped_temp_dir.h" #include "base/lazy_instance.h" -#endif #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "base/string_piece.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" #include "ui/gfx/native_widget_types.h" #include "webkit/tools/test_shell/webview_host.h" diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index 951fc74c51fd8b..937375c5aa41bb 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -109,7 +109,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { SimpleClipboardClient clipboard_client_; webkit_glue::WebClipboardImpl real_clipboard_; webkit_glue::WebFileUtilitiesImpl file_utilities_; - ScopedTempDir appcache_dir_; + base::ScopedTempDir appcache_dir_; SimpleAppCacheSystem appcache_system_; SimpleDatabaseSystem database_system_; SimpleDomStorageSystem dom_storage_system_;