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

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

Issue 3110008: Massive refactoring of extensions sync code (Closed) Base URL: 76.121.192.83:~/projects/chromium/src
Patch Set: Fixed compile error Created 10 years, 4 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 7df1709bb1a105f210a57cc5ca79c9942706740e..19502177a8cb169613c425d5fadaf5d3632092da 100644
--- a/chrome/browser/sync/glue/extension_util.h
+++ b/chrome/browser/sync/glue/extension_util.h
@@ -6,9 +6,14 @@
#define CHROME_BROWSER_SYNC_GLUE_EXTENSION_UTIL_H_
#pragma once
+// This file contains some low-level utility functions used by
+// extensions sync.
+
+#include <set>
#include <string>
class Extension;
+class ExtensionTypeSet;
class ExtensionsService;
namespace sync_pb {
@@ -17,8 +22,26 @@ class ExtensionSpecifics;
namespace browser_sync {
+enum ExtensionType {
+ THEME,
+ EXTENSION,
+ USER_SCRIPT,
+ APP,
+};
+
+typedef std::set<ExtensionType> ExtensionTypeSet;
+
+// Returns the type of the given extension.
+//
+// TODO(akalin): Might be useful to move this into extension.cc.
+ExtensionType GetExtensionType(const Extension& extension);
+
+// Returns whether or not the given extension is one we want to sync.
+bool IsExtensionValid(const Extension& extension);
+
// Returns whether or not the given extension is one we want to sync.
-bool IsExtensionSyncable(const Extension& extension);
+bool IsExtensionValidAndSyncable(const Extension& extension,
+ const ExtensionTypeSet& allowed_types);
// Stringifies the given ExtensionSpecifics.
std::string ExtensionSpecificsToString(
« 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