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

Side by Side Diff: components/sync/driver/sync_stopped_reporter.cc

Issue 2657013002: Introduce ThreadTaskRunnerHandle::OverrideForTesting and TestMockTimeTaskRunner::ScopedContext. (Closed)
Patch Set: fix RecentTabHelperTest crash? Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/driver/sync_stopped_reporter.h" 5 #include "components/sync/driver/sync_stopped_reporter.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 std::string path = sync_service_url.path(); 104 std::string path = sync_service_url.path();
105 if (path.empty() || *path.rbegin() != '/') { 105 if (path.empty() || *path.rbegin() != '/') {
106 path += '/'; 106 path += '/';
107 } 107 }
108 path += kEventEndpoint; 108 path += kEventEndpoint;
109 GURL::Replacements replacements; 109 GURL::Replacements replacements;
110 replacements.SetPathStr(path); 110 replacements.SetPathStr(path);
111 return sync_service_url.ReplaceComponents(replacements); 111 return sync_service_url.ReplaceComponents(replacements);
112 } 112 }
113 113
114 void SyncStoppedReporter::SetTimerTaskRunnerForTest(
115 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
116 timer_.SetTaskRunner(task_runner);
117 }
118
119 } // namespace syncer 114 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698