summaryrefslogtreecommitdiffstats
path: root/sync/test/fake_server/entity_builder_factory.h
blob: f3b36f73b381d23d1021b3217d3b0e415f4856d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_FACTORY_H_
#define SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_FACTORY_H_

#include <string>

#include "sync/test/fake_server/bookmark_entity_builder.h"
#include "url/gurl.h"

namespace fake_server {

// Creates various types of EntityBuilders.
//
// add comment of why this class exists
class EntityBuilderFactory {
 public:
  EntityBuilderFactory();
  EntityBuilderFactory(const std::string& cache_guid);
  virtual ~EntityBuilderFactory();

  BookmarkEntityBuilder NewBookmarkEntityBuilder(const std::string& title,
                                                 const GURL& url);
 private:
  // An identifier used when creating entities. This value is used similarly to
  // the value in the Sync directory code.
  std::string cache_guid_;

  // The latest client item id assigned to an entity.
  int64 latest_client_item_id_;
};

}  // namespace fake_server

#endif  // SYNC_TEST_FAKE_SERVER_ENTITY_BUILDER_FACTORY_H_