Small clean up to about_flags_unittest.cc.
[chromium-blink-merge.git] / sync / test / fake_server / entity_builder_factory.h
bloba8fa888b28d79352ba73b9181575909459a8f3dc
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_FACTORY_H_
6 #define SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_FACTORY_H_
8 #include <string>
10 #include "sync/test/fake_server/bookmark_entity_builder.h"
11 #include "url/gurl.h"
13 namespace fake_server {
15 // Creates various types of EntityBuilders.
17 // This class exists because we maintain state related to the fake client that
18 // supposedly created these entities.
20 // TODO(pvalenzuela): Revisit the naming of this class once the FakeServer
21 // injection API is widely used. If this class stays bookmark-specific, it
22 // should be named appropriately.
23 class EntityBuilderFactory {
24 public:
25 EntityBuilderFactory();
26 explicit EntityBuilderFactory(const std::string& cache_guid);
27 virtual ~EntityBuilderFactory();
29 BookmarkEntityBuilder NewBookmarkEntityBuilder(const std::string& title,
30 const GURL& url);
32 private:
33 // An identifier used when creating entities. This value is used similarly to
34 // the value in the Sync directory code.
35 std::string cache_guid_;
37 // The latest client item id assigned to an entity.
38 int64 latest_client_item_id_;
41 } // namespace fake_server
43 #endif // SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_FACTORY_H_