| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 public service_manager::InterfaceFactory< | 615 public service_manager::InterfaceFactory< |
| 616 service_manager::mojom::ServiceFactory> { | 616 service_manager::mojom::ServiceFactory> { |
| 617 public: | 617 public: |
| 618 explicit ServiceTestClient(service_manager::test::ServiceTest* test) | 618 explicit ServiceTestClient(service_manager::test::ServiceTest* test) |
| 619 : service_manager::test::ServiceTestClient(test) { | 619 : service_manager::test::ServiceTestClient(test) { |
| 620 registry_.AddInterface<service_manager::mojom::ServiceFactory>(this); | 620 registry_.AddInterface<service_manager::mojom::ServiceFactory>(this); |
| 621 } | 621 } |
| 622 ~ServiceTestClient() override {} | 622 ~ServiceTestClient() override {} |
| 623 | 623 |
| 624 protected: | 624 protected: |
| 625 void OnBindInterface(const service_manager::ServiceInfo& source_info, | 625 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
| 626 const std::string& interface_name, | 626 const std::string& interface_name, |
| 627 mojo::ScopedMessagePipeHandle interface_pipe) override { | 627 mojo::ScopedMessagePipeHandle interface_pipe) override { |
| 628 registry_.BindInterface(source_info.identity, interface_name, | 628 registry_.BindInterface(source_info.identity, interface_name, |
| 629 std::move(interface_pipe)); | 629 std::move(interface_pipe)); |
| 630 } | 630 } |
| 631 | 631 |
| 632 void CreateService(service_manager::mojom::ServiceRequest request, | 632 void CreateService(service_manager::mojom::ServiceRequest request, |
| 633 const std::string& name) override { | 633 const std::string& name) override { |
| 634 if (name == file::mojom::kServiceName) { | 634 if (name == file::mojom::kServiceName) { |
| 635 file_service_context_.reset(new service_manager::ServiceContext( | 635 file_service_context_.reset(new service_manager::ServiceContext( |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 base::RunLoop().RunUntilIdle(); | 840 base::RunLoop().RunUntilIdle(); |
| 841 | 841 |
| 842 // Data should have been preserved now. | 842 // Data should have been preserved now. |
| 843 context = base::MakeUnique<LocalStorageContextMojo>( | 843 context = base::MakeUnique<LocalStorageContextMojo>( |
| 844 connector(), nullptr, base::FilePath(), test_path); | 844 connector(), nullptr, base::FilePath(), test_path); |
| 845 EXPECT_TRUE(DoTestGet(context.get(), key, &result)); | 845 EXPECT_TRUE(DoTestGet(context.get(), key, &result)); |
| 846 EXPECT_EQ(value, result); | 846 EXPECT_EQ(value, result); |
| 847 } | 847 } |
| 848 | 848 |
| 849 } // namespace content | 849 } // namespace content |
| OLD | NEW |