| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "components/sync/engine/net/http_bridge.h" | 5 #include "components/sync/engine/net/http_bridge.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bit_cast.h" | 9 #include "base/bit_cast.h" |
| 10 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 11 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 12 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 13 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 15 #include "components/sync/base/cancelation_signal.h" | 16 #include "components/sync/base/cancelation_signal.h" |
| 16 #include "net/http/http_response_headers.h" | 17 #include "net/http/http_response_headers.h" |
| 17 #include "net/test/embedded_test_server/embedded_test_server.h" | 18 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 18 #include "net/url_request/test_url_fetcher_factory.h" | 19 #include "net/url_request/test_url_fetcher_factory.h" |
| 19 #include "net/url_request/url_request_test_util.h" | 20 #include "net/url_request/url_request_test_util.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 548 |
| 548 // Sync thread: Finally run the posted task, only to find that our | 549 // Sync thread: Finally run the posted task, only to find that our |
| 549 // HttpBridgeFactory has been neutered. Should not crash. | 550 // HttpBridgeFactory has been neutered. Should not crash. |
| 550 factory->Init("TestUserAgent", BindToTrackerCallback()); | 551 factory->Init("TestUserAgent", BindToTrackerCallback()); |
| 551 | 552 |
| 552 // At this point, attempting to use the factory would trigger a crash. Both | 553 // At this point, attempting to use the factory would trigger a crash. Both |
| 553 // this test and the real world code should make sure this never happens. | 554 // this test and the real world code should make sure this never happens. |
| 554 } | 555 } |
| 555 | 556 |
| 556 } // namespace syncer | 557 } // namespace syncer |
| OLD | NEW |