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

Side by Side Diff: components/sync/api/attachments/attachment_unittest.cc

Issue 2388973002: [Sync] Removing duplicate includes, part 2. (Closed)
Patch Set: Update for Max's comments. Created 4 years, 2 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 #include "components/sync/api/attachments/attachment.h" 5 #include "components/sync/api/attachments/attachment.h"
6 6
7 #include <stdint.h>
8
9 #include <string> 7 #include <string>
10 8
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/ref_counted_memory.h"
13 #include "components/sync/core/attachments/attachment_util.h" 9 #include "components/sync/core/attachments/attachment_util.h"
14 #include "components/sync/protocol/sync.pb.h" 10 #include "components/sync/protocol/sync.pb.h"
15 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
16 12
17 namespace syncer { 13 namespace syncer {
18 14
19 namespace { 15 namespace {
20 16
21 const char kAttachmentData[] = "some data"; 17 const char kAttachmentData[] = "some data";
22 18
(...skipping 20 matching lines...) Expand all
43 scoped_refptr<base::RefCountedString> some_data(new base::RefCountedString); 39 scoped_refptr<base::RefCountedString> some_data(new base::RefCountedString);
44 some_data->data() = kAttachmentData; 40 some_data->data() = kAttachmentData;
45 uint32_t crc32c = ComputeCrc32c(some_data); 41 uint32_t crc32c = ComputeCrc32c(some_data);
46 AttachmentId id = AttachmentId::Create(some_data->size(), crc32c); 42 AttachmentId id = AttachmentId::Create(some_data->size(), crc32c);
47 Attachment a = Attachment::CreateFromParts(id, some_data); 43 Attachment a = Attachment::CreateFromParts(id, some_data);
48 EXPECT_EQ(id, a.GetId()); 44 EXPECT_EQ(id, a.GetId());
49 EXPECT_EQ(some_data, a.GetData()); 45 EXPECT_EQ(some_data, a.GetData());
50 } 46 }
51 47
52 } // namespace syncer 48 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/api/attachments/attachment_metadata_unittest.cc ('k') | components/sync/api/model_type_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698