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

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

Issue 10152003: sync: Make BaseNode lookup-related Init functions return specific failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // chrome id. 70 // chrome id.
71 virtual int64 GetSyncIdFromChromeId(const IDType& id) = 0; 71 virtual int64 GetSyncIdFromChromeId(const IDType& id) = 0;
72 72
73 // Returns the chrome node for the given sync id. 73 // Returns the chrome node for the given sync id.
74 // Returns NULL if no node is found for the given sync id. 74 // Returns NULL if no node is found for the given sync id.
75 virtual const Node* GetChromeNodeFromSyncId(int64 sync_id) = 0; 75 virtual const Node* GetChromeNodeFromSyncId(int64 sync_id) = 0;
76 76
77 // Initializes the given sync node from the given chrome node id. 77 // Initializes the given sync node from the given chrome node id.
78 // Returns false if no sync node was found for the given chrome node id or 78 // Returns false if no sync node was found for the given chrome node id or
79 // if the initialization of sync node fails. 79 // if the initialization of sync node fails.
80 virtual bool InitSyncNodeFromChromeId(const IDType& node_id, 80 virtual bool InitSyncNodeFromChromeId(
81 sync_api::BaseNode* sync_node) = 0; 81 const IDType& node_id,
82 sync_api::BaseNode* sync_node) = 0;
82 83
83 // Associates the given chrome node with the given sync id. 84 // Associates the given chrome node with the given sync id.
84 virtual void Associate(const Node* node, int64 sync_id) = 0; 85 virtual void Associate(const Node* node, int64 sync_id) = 0;
85 86
86 // Remove the association that corresponds to the given sync id. 87 // Remove the association that corresponds to the given sync id.
87 virtual void Disassociate(int64 sync_id) = 0; 88 virtual void Disassociate(int64 sync_id) = 0;
88 }; 89 };
89 90
90 } // namespace browser_sync 91 } // namespace browser_sync
91 92
92 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_H_ 93 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/generic_change_processor.cc ('k') | chrome/browser/sync/glue/password_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698