Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: components/sync/core/http_bridge_unittest.cc

Issue 2388973002: [Sync] Removing duplicate includes, part 2. (Closed)
Patch Set: Update for Max's comments. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/core/http_bridge.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 #include <stdint.h>
7 8
8 #include "base/bit_cast.h" 9 #include "base/bit_cast.h"
9 #include "base/run_loop.h" 10 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
11 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
12 #include "base/synchronization/waitable_event.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/sync/base/cancelation_signal.h" 15 #include "components/sync/base/cancelation_signal.h"
16 #include "components/sync/core/http_bridge.h"
17 #include "components/sync/core/http_post_provider_factory.h"
18 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
19 #include "net/test/embedded_test_server/embedded_test_server.h" 17 #include "net/test/embedded_test_server/embedded_test_server.h"
20 #include "net/url_request/test_url_fetcher_factory.h" 18 #include "net/url_request/test_url_fetcher_factory.h"
21 #include "net/url_request/url_fetcher_delegate.h"
22 #include "net/url_request/url_request_test_util.h" 19 #include "net/url_request/url_request_test_util.h"
23 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
24 21
25 namespace syncer { 22 namespace syncer {
26 23
27 namespace { 24 namespace {
28 25
29 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113. 26 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113.
30 const base::FilePath::CharType kDocRoot[] = 27 const base::FilePath::CharType kDocRoot[] =
31 FILE_PATH_LITERAL("chrome/test/data"); 28 FILE_PATH_LITERAL("chrome/test/data");
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 569
573 // Sync thread: Finally run the posted task, only to find that our 570 // Sync thread: Finally run the posted task, only to find that our
574 // HttpBridgeFactory has been neutered. Should not crash. 571 // HttpBridgeFactory has been neutered. Should not crash.
575 factory->Init("TestUserAgent", BindToTrackerCallback()); 572 factory->Init("TestUserAgent", BindToTrackerCallback());
576 573
577 // At this point, attempting to use the factory would trigger a crash. Both 574 // At this point, attempting to use the factory would trigger a crash. Both
578 // this test and the real world code should make sure this never happens. 575 // this test and the real world code should make sure this never happens.
579 } 576 }
580 577
581 } // namespace syncer 578 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core/change_record_unittest.cc ('k') | components/sync/core/processor_entity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698