summaryrefslogtreecommitdiffstats
path: root/sync/util
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 23:47:42 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 23:47:42 +0000
commitaa166d02133c942de7498ebab60a47de2827f3df (patch)
tree6d617d623d0a6b361ee4bf21728a5467a87ed613 /sync/util
parentce507cbf2a4c50d83855f08f8717df736584338b (diff)
downloadchromium_src-aa166d02133c942de7498ebab60a47de2827f3df.zip
chromium_src-aa166d02133c942de7498ebab60a47de2827f3df.tar.gz
chromium_src-aa166d02133c942de7498ebab60a47de2827f3df.tar.bz2
[sync] Componentize sync: Part 2: Add SYNC_EXPORTs to files in src/sync/
One of the long term goals of the sync team is to pull sync code out of chrome.dll and into its own component. As of today, several chrome targets depend on various sync targets as defined in sync.gyp. We'd like to move to a world where all chrome targets outside sync.gyp simply depend on the target sync.gyp:sync, which is built into its own component. This patch sets the stage for full componentization by adding SYNC_EXPORT annotations to classes / methods within src/sync. The final step of breaking off sync into its own component will be done in https://codereview.chromium.org/11412211. BUG=136928 Review URL: https://chromiumcodereview.appspot.com/11515009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/util')
-rw-r--r--sync/util/DEPS1
-rw-r--r--sync/util/cryptographer.h5
-rw-r--r--sync/util/extensions_activity_monitor.h7
-rw-r--r--sync/util/get_session_name.h5
-rw-r--r--sync/util/nigori.h5
-rw-r--r--sync/util/time.h7
6 files changed, 18 insertions, 12 deletions
diff --git a/sync/util/DEPS b/sync/util/DEPS
index 3bef302..13d7bf1 100644
--- a/sync/util/DEPS
+++ b/sync/util/DEPS
@@ -1,5 +1,6 @@
include_rules = [
"+crypto",
+ "+sync/base",
"+sync/internal_api/public/base",
"+sync/internal_api/public/util",
"+sync/protocol",
diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h
index 1a3ee3a..384ba78 100644
--- a/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 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.
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
+#include "sync/base/sync_export.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/util/nigori.h"
@@ -46,7 +47,7 @@ struct KeyParams {
// CanDecrypt should be used to verify whether the Cryptographer can decrypt
// that node. If it cannot, then the application of that update should be
// delayed until after it can be decrypted.
-class Cryptographer {
+class SYNC_EXPORT Cryptographer {
public:
// Does not take ownership of |encryptor|.
explicit Cryptographer(Encryptor* encryptor);
diff --git a/sync/util/extensions_activity_monitor.h b/sync/util/extensions_activity_monitor.h
index f333b7b..699f7b5 100644
--- a/sync/util/extensions_activity_monitor.h
+++ b/sync/util/extensions_activity_monitor.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 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.
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "sync/base/sync_export.h"
namespace syncer {
@@ -17,10 +18,10 @@ namespace syncer {
// acknowledged it (successful commit response).
//
// All abstract methods are called from the sync thread.
-class ExtensionsActivityMonitor {
+class SYNC_EXPORT ExtensionsActivityMonitor {
public:
// A data record of activity performed by extension |extension_id|.
- struct Record {
+ struct SYNC_EXPORT Record {
Record();
~Record();
diff --git a/sync/util/get_session_name.h b/sync/util/get_session_name.h
index 3b8dd5a..4a0600d 100644
--- a/sync/util/get_session_name.h
+++ b/sync/util/get_session_name.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 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.
@@ -9,6 +9,7 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
+#include "sync/base/sync_export.h"
namespace base {
class TaskRunner;
@@ -16,7 +17,7 @@ class TaskRunner;
namespace syncer {
-void GetSessionName(
+SYNC_EXPORT void GetSessionName(
const scoped_refptr<base::TaskRunner>& task_runner,
const base::Callback<void(const std::string&)>& done_callback);
diff --git a/sync/util/nigori.h b/sync/util/nigori.h
index a33f0b6..cd67bf9 100644
--- a/sync/util/nigori.h
+++ b/sync/util/nigori.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 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.
@@ -8,6 +8,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
+#include "sync/base/sync_export.h"
namespace crypto {
class SymmetricKey;
@@ -24,7 +25,7 @@ namespace syncer {
// and retrieve the secret.
//
// TODO: Link to doc.
-class Nigori {
+class SYNC_EXPORT Nigori {
public:
enum Type {
Password = 1,
diff --git a/sync/util/time.h b/sync/util/time.h
index 8ba72a3..2b0b245 100644
--- a/sync/util/time.h
+++ b/sync/util/time.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 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.
//
@@ -11,17 +11,18 @@
#include "base/basictypes.h"
#include "base/time.h"
+#include "sync/base/sync_export.h"
namespace syncer {
// Converts a time object to the format used in sync protobufs (ms
// since the Unix epoch).
-int64 TimeToProtoTime(const base::Time& t);
+SYNC_EXPORT int64 TimeToProtoTime(const base::Time& t);
// Converts a time field from sync protobufs to a time object.
base::Time ProtoTimeToTime(int64 proto_t);
-std::string GetTimeDebugString(const base::Time& t);
+SYNC_EXPORT std::string GetTimeDebugString(const base::Time& t);
} // namespace syncer