Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/dom_storage/local_storage_context_mojo.h" | 5 #include "content/browser/dom_storage/local_storage_context_mojo.h" |
| 6 | 6 |
| 7 #include "base/files/file_enumerator.h" | 7 #include "base/files/file_enumerator.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 670 } | 670 } |
| 671 | 671 |
| 672 void TearDown() override { | 672 void TearDown() override { |
| 673 ServiceTest::TearDown(); | 673 ServiceTest::TearDown(); |
| 674 } | 674 } |
| 675 | 675 |
| 676 std::unique_ptr<service_manager::Service> CreateService() override { | 676 std::unique_ptr<service_manager::Service> CreateService() override { |
| 677 return base::MakeUnique<ServiceTestClient>(this); | 677 return base::MakeUnique<ServiceTestClient>(this); |
| 678 } | 678 } |
| 679 | 679 |
| 680 std::unique_ptr<base::MessageLoop> CreateMessageLoop() override { | |
| 681 return nullptr; | |
|
fdoray
2017/05/10 16:53:50
Returning nullptr prevented initialization of a Me
| |
| 682 } | |
| 683 | |
| 684 const base::FilePath& temp_path() { return temp_path_.GetPath(); } | 680 const base::FilePath& temp_path() { return temp_path_.GetPath(); } |
| 685 | 681 |
| 686 base::FilePath FirstEntryInDir() { | 682 base::FilePath FirstEntryInDir() { |
| 687 base::FileEnumerator enumerator( | 683 base::FileEnumerator enumerator( |
| 688 temp_path(), false /* recursive */, | 684 temp_path(), false /* recursive */, |
| 689 base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES); | 685 base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES); |
| 690 return enumerator.Next(); | 686 return enumerator.Next(); |
| 691 } | 687 } |
| 692 | 688 |
| 693 void DoTestPut(LocalStorageContextMojo* context, | 689 void DoTestPut(LocalStorageContextMojo* context, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 839 base::RunLoop().RunUntilIdle(); | 835 base::RunLoop().RunUntilIdle(); |
| 840 | 836 |
| 841 // Data should have been preserved now. | 837 // Data should have been preserved now. |
| 842 context = base::MakeUnique<LocalStorageContextMojo>( | 838 context = base::MakeUnique<LocalStorageContextMojo>( |
| 843 connector(), nullptr, base::FilePath(), test_path); | 839 connector(), nullptr, base::FilePath(), test_path); |
| 844 EXPECT_TRUE(DoTestGet(context.get(), key, &result)); | 840 EXPECT_TRUE(DoTestGet(context.get(), key, &result)); |
| 845 EXPECT_EQ(value, result); | 841 EXPECT_EQ(value, result); |
| 846 } | 842 } |
| 847 | 843 |
| 848 } // namespace content | 844 } // namespace content |
| OLD | NEW |