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

Side by Side Diff: chrome/browser/sync/glue/extension_model_associator.h

Issue 3063002: Merge 53127 - Added checks to handle unsyncable extensions.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // TODO(akalin): Return an error string instead of just a bool. 56 // TODO(akalin): Return an error string instead of just a bool.
57 bool OnClientUpdate(const std::string& id); 57 bool OnClientUpdate(const std::string& id);
58 void OnServerUpdate(const sync_pb::ExtensionSpecifics& server_data); 58 void OnServerUpdate(const sync_pb::ExtensionSpecifics& server_data);
59 void OnServerRemove(const std::string& id); 59 void OnServerRemove(const std::string& id);
60 60
61 private: 61 private:
62 // Returns the extension service from |sync_service_|. Never 62 // Returns the extension service from |sync_service_|. Never
63 // returns NULL. 63 // returns NULL.
64 ExtensionsService* GetExtensionsService(); 64 ExtensionsService* GetExtensionsService();
65 65
66 bool GetExtensionDataFromClient(
67 const std::string& id, sync_pb::ExtensionSpecifics* client_data);
68
69 bool GetExtensionDataFromServer( 66 bool GetExtensionDataFromServer(
70 const std::string& id, sync_api::WriteTransaction* trans, 67 const std::string& id, sync_api::WriteTransaction* trans,
71 const sync_api::ReadNode& root, 68 const sync_api::ReadNode& root,
72 sync_pb::ExtensionSpecifics* server_data); 69 sync_pb::ExtensionSpecifics* server_data);
73 70
74 // Updates the server data from the given extension data. 71 // Updates the server data from the given extension data.
75 // extension_data->ServerNeedsUpdate() must hold before this 72 // extension_data->ServerNeedsUpdate() must hold before this
76 // function is called. Returns whether or not the update was 73 // function is called. Returns whether or not the update was
77 // successful. If the update was successful, 74 // successful. If the update was successful,
78 // extension_data->ServerNeedsUpdate() will be false after this 75 // extension_data->ServerNeedsUpdate() will be false after this
(...skipping 20 matching lines...) Expand all
99 96
100 // Weak pointer. 97 // Weak pointer.
101 ProfileSyncService* sync_service_; 98 ProfileSyncService* sync_service_;
102 99
103 DISALLOW_COPY_AND_ASSIGN(ExtensionModelAssociator); 100 DISALLOW_COPY_AND_ASSIGN(ExtensionModelAssociator);
104 }; 101 };
105 102
106 } // namespace browser_sync 103 } // namespace browser_sync
107 104
108 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_ 105 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_change_processor.cc ('k') | chrome/browser/sync/glue/extension_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698