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

Unified Diff: sync/api/attachments/attachment.h

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Add AttachmentServiceBase allowing us to drop AsWeakPtr and RefCountedThreadSafe from AttachmentServiceProxy. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: sync/api/attachments/attachment.h
diff --git a/sync/api/attachments/attachment.h b/sync/api/attachments/attachment.h
index da0079838ad54ae41a8690a2866b34c6a4f60b52..af4c36da70b0f71eb8393c03fc0fa89074d7265d 100644
--- a/sync/api/attachments/attachment.h
+++ b/sync/api/attachments/attachment.h
@@ -9,7 +9,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h"
@@ -33,14 +32,13 @@ class SYNC_EXPORT Attachment {
// Creates an attachment with a unique id and the supplied data.
//
// Used when creating a brand new attachment.
- static scoped_ptr<Attachment> Create(
- const scoped_refptr<base::RefCountedMemory>& data);
+ static Attachment Create(const scoped_refptr<base::RefCountedMemory>& data);
// Creates an attachment with the supplied id and data.
//
// Used when you want to recreate a specific attachment. E.g. creating a local
// copy of an attachment that already exists on the sync server.
- static scoped_ptr<Attachment> CreateWithId(
+ static Attachment CreateWithId(
const AttachmentId& id,
const scoped_refptr<base::RefCountedMemory>& data);
@@ -54,9 +52,6 @@ class SYNC_EXPORT Attachment {
AttachmentId id_;
scoped_refptr<base::RefCountedMemory> data_;
- friend class AttachmentTest;
- FRIEND_TEST_ALL_PREFIXES(AttachmentTest, CreateId_UniqueIdIsUnique);
-
Attachment(const AttachmentId& id,
const scoped_refptr<base::RefCountedMemory>& data);
};

Powered by Google App Engine
This is Rietveld 408576698