ServiceWorker: Consolidate version manipulation functions in SWProviderContext
[chromium-blink-merge.git] / sync / test / fake_server / entity_builder.h
blobadb3d10d897979f772bc6ba9155ba3283746f4bb
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
3 // found in the LICENSE file.
5 #ifndef SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_H_
6 #define SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "sync/internal_api/public/base/model_type.h"
12 #include "sync/test/fake_server/fake_server_entity.h"
13 #include "url/gurl.h"
15 namespace fake_server {
17 // Parent class for FakeServerEntity builders.
18 class EntityBuilder {
19 public:
20 virtual ~EntityBuilder();
22 // Builds a FakeServerEntity and returns a scoped_ptr tht owns it. If building
23 // was not successful, the returned scoped_ptr will not own a
24 // FakeServerEntity*.
25 virtual scoped_ptr<FakeServerEntity> Build() = 0;
27 protected:
28 EntityBuilder(syncer::ModelType model_type, const std::string& name);
30 std::string id_;
31 syncer::ModelType model_type_;
32 std::string name_;
35 } // namespace fake_server
37 #endif // SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_H_