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

Unified Diff: chrome/browser/sync/glue/extension_util.h

Issue 6902054: [Sync] Rip out overly-complicated ExtensionData class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed asargent's comments Created 9 years, 8 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
« no previous file with comments | « chrome/browser/sync/glue/extension_sync_traits.cc ('k') | chrome/browser/sync/glue/extension_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/extension_util.h
diff --git a/chrome/browser/sync/glue/extension_util.h b/chrome/browser/sync/glue/extension_util.h
index 7f16cfe5b78964a3d5257938abc3bcb0628002ce..e1d0d90a0a40343c21a286ba8b36ca3974f873c3 100644
--- a/chrome/browser/sync/glue/extension_util.h
+++ b/chrome/browser/sync/glue/extension_util.h
@@ -12,7 +12,6 @@
#include <string>
class Extension;
-class ExtensionServiceInterface;
struct ExtensionSyncData;
namespace sync_pb {
@@ -28,64 +27,6 @@ bool IsExtensionValid(const Extension& extension);
std::string ExtensionSpecificsToString(
const sync_pb::ExtensionSpecifics& specifics);
-// Returns whether or not the values of the given specifics are valid,
-// in particular the id, version, and update URL.
-bool IsExtensionSpecificsValid(
- const sync_pb::ExtensionSpecifics& specifics);
-
-// Equivalent to DCHECK(IsExtensionSpecificsValid(specifics)) <<
-// ExtensionSpecificsToString(specifics);
-void DcheckIsExtensionSpecificsValid(
- const sync_pb::ExtensionSpecifics& specifics);
-
-// Returns true iff two ExtensionSpecifics denote the same extension
-// state. Neither |a| nor |b| need to be valid.
-bool AreExtensionSpecificsEqual(const sync_pb::ExtensionSpecifics& a,
- const sync_pb::ExtensionSpecifics& b);
-
-// Returns true iff the given ExtensionSpecifics is equal to the empty
-// ExtensionSpecifics object. |specifics| does not have to be valid
-// and indeed, IsExtensionSpecificsValid(specifics) ->
-// !IsExtensionSpecificsUnset(specifics).
-bool IsExtensionSpecificsUnset(
- const sync_pb::ExtensionSpecifics& specifics);
-
-// Copies the user properties from |specifics| into |dest_specifics|.
-// User properties are properties that are set by the user, i.e. not
-// inherent to the extension. Currently they include |enabled| and
-// |incognito_enabled|. Neither parameter need be valid.
-void CopyUserProperties(
- const sync_pb::ExtensionSpecifics& specifics,
- sync_pb::ExtensionSpecifics* dest_specifics);
-
-// Copies everything but non-user properties. Neither parameter need
-// be valid.
-void CopyNonUserProperties(
- const sync_pb::ExtensionSpecifics& specifics,
- sync_pb::ExtensionSpecifics* dest_specifics);
-
-// Returns true iff two ExtensionSpecifics have the same user
-// properties. Neither |a| nor |b| need to be valid.
-bool AreExtensionSpecificsUserPropertiesEqual(
- const sync_pb::ExtensionSpecifics& a,
- const sync_pb::ExtensionSpecifics& b);
-
-// Returns true iff two ExtensionSpecifics have the same non-user
-// properties. Neither |a| nor |b| need to be valid.
-bool AreExtensionSpecificsNonUserPropertiesEqual(
- const sync_pb::ExtensionSpecifics& a,
- const sync_pb::ExtensionSpecifics& b);
-
-// Merge |specifics| into |merged_specifics|. Both must be valid and
-// have the same ID. The merge policy is currently to copy the
-// non-user properties of |specifics| into |merged_specifics| (and the
-// user properties if |merge_user_properties| is set) if |specifics|
-// has a more recent or the same version as |merged_specifics|.
-void MergeExtensionSpecifics(
- const sync_pb::ExtensionSpecifics& specifics,
- bool merge_user_properties,
- sync_pb::ExtensionSpecifics* merged_specifics);
-
// Fills |sync_data| with the data from |specifics|. Returns true iff
// succesful.
bool SpecificsToSyncData(
« no previous file with comments | « chrome/browser/sync/glue/extension_sync_traits.cc ('k') | chrome/browser/sync/glue/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698