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

Side by Side Diff: sync/test/fake_server/fake_server_http_post_provider.h

Issue 1339943003: Revert "Report data usage UMA for Chrome services" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_ 5 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_ 6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
13 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
14 #include "base/synchronization/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
15 #include "sync/internal_api/public/http_post_provider_factory.h" 14 #include "sync/internal_api/public/http_post_provider_factory.h"
16 #include "sync/internal_api/public/http_post_provider_interface.h" 15 #include "sync/internal_api/public/http_post_provider_interface.h"
17 16
18 namespace fake_server { 17 namespace fake_server {
19 18
20 class FakeServer; 19 class FakeServer;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 63
65 class FakeServerHttpPostProviderFactory 64 class FakeServerHttpPostProviderFactory
66 : public syncer::HttpPostProviderFactory { 65 : public syncer::HttpPostProviderFactory {
67 public: 66 public:
68 FakeServerHttpPostProviderFactory( 67 FakeServerHttpPostProviderFactory(
69 const base::WeakPtr<FakeServer>& fake_server, 68 const base::WeakPtr<FakeServer>& fake_server,
70 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner); 69 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner);
71 ~FakeServerHttpPostProviderFactory() override; 70 ~FakeServerHttpPostProviderFactory() override;
72 71
73 // HttpPostProviderFactory: 72 // HttpPostProviderFactory:
74 void Init( 73 void Init(const std::string& user_agent) override;
75 const std::string& user_agent,
76 const syncer::BindToTrackerCallback& bind_to_tracker_callback) override;
77 syncer::HttpPostProviderInterface* Create() override; 74 syncer::HttpPostProviderInterface* Create() override;
78 void Destroy(syncer::HttpPostProviderInterface* http) override; 75 void Destroy(syncer::HttpPostProviderInterface* http) override;
79 76
80 private: 77 private:
81 // |fake_server_| should only be dereferenced on the same thread as 78 // |fake_server_| should only be dereferenced on the same thread as
82 // |fake_server_task_runner_| runs on. 79 // |fake_server_task_runner_| runs on.
83 base::WeakPtr<FakeServer> fake_server_; 80 base::WeakPtr<FakeServer> fake_server_;
84 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner_; 81 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner_;
85 82
86 DISALLOW_COPY_AND_ASSIGN(FakeServerHttpPostProviderFactory); 83 DISALLOW_COPY_AND_ASSIGN(FakeServerHttpPostProviderFactory);
87 }; 84 };
88 85
89 } // namespace fake_server 86 } // namespace fake_server
90 87
91 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_ 88 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698