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

Side by Side Diff: sync/internal_api/http_bridge_unittest.cc

Issue 629733002: replace OVERRIDE and FINAL with override and final in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "base/synchronization/waitable_event.h" 5 #include "base/synchronization/waitable_event.h"
6 #include "base/threading/thread.h" 6 #include "base/threading/thread.h"
7 #include "net/test/spawned_test_server/spawned_test_server.h" 7 #include "net/test/spawned_test_server/spawned_test_server.h"
8 #include "net/url_request/test_url_fetcher_factory.h" 8 #include "net/url_request/test_url_fetcher_factory.h"
9 #include "net/url_request/url_fetcher_delegate.h" 9 #include "net/url_request/url_fetcher_delegate.h"
10 #include "net/url_request/url_request_test_util.h" 10 #include "net/url_request/url_request_test_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // If |never_finishes| is true, the simulated request never actually 117 // If |never_finishes| is true, the simulated request never actually
118 // returns. 118 // returns.
119 ShuntedHttpBridge(net::URLRequestContextGetter* baseline_context_getter, 119 ShuntedHttpBridge(net::URLRequestContextGetter* baseline_context_getter,
120 SyncHttpBridgeTest* test, bool never_finishes) 120 SyncHttpBridgeTest* test, bool never_finishes)
121 : HttpBridge( 121 : HttpBridge(
122 new HttpBridge::RequestContextGetter( 122 new HttpBridge::RequestContextGetter(
123 baseline_context_getter, "user agent"), 123 baseline_context_getter, "user agent"),
124 NetworkTimeUpdateCallback()), 124 NetworkTimeUpdateCallback()),
125 test_(test), never_finishes_(never_finishes) { } 125 test_(test), never_finishes_(never_finishes) { }
126 protected: 126 protected:
127 virtual void MakeAsynchronousPost() OVERRIDE { 127 virtual void MakeAsynchronousPost() override {
128 ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop()); 128 ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop());
129 if (never_finishes_) 129 if (never_finishes_)
130 return; 130 return;
131 131
132 // We don't actually want to make a request for this test, so just callback 132 // We don't actually want to make a request for this test, so just callback
133 // as if it completed. 133 // as if it completed.
134 test_->GetIOThreadLoop()->PostTask(FROM_HERE, 134 test_->GetIOThreadLoop()->PostTask(FROM_HERE,
135 base::Bind(&ShuntedHttpBridge::CallOnURLFetchComplete, this)); 135 base::Bind(&ShuntedHttpBridge::CallOnURLFetchComplete, this));
136 } 136 }
137 private: 137 private:
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 // Sync thread: Finally run the posted task, only to find that our 511 // Sync thread: Finally run the posted task, only to find that our
512 // HttpBridgeFactory has been neutered. Should not crash. 512 // HttpBridgeFactory has been neutered. Should not crash.
513 factory->Init("TestUserAgent"); 513 factory->Init("TestUserAgent");
514 514
515 // At this point, attempting to use the factory would trigger a crash. Both 515 // At this point, attempting to use the factory would trigger a crash. Both
516 // this test and the real world code should make sure this never happens. 516 // this test and the real world code should make sure this never happens.
517 }; 517 };
518 518
519 } // namespace syncer 519 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/debug_info_event_listener.h ('k') | sync/internal_api/js_mutation_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698