OLD | NEW |
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 Loading... |
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 |
OLD | NEW |