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

Side by Side Diff: sync/engine/sync_engine_event.h

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 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
« no previous file with comments | « sync/engine/clear_data_command_unittest.cc ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 5 #ifndef SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
6 #define SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 6 #define SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 // New token in updated_token. 35 // New token in updated_token.
36 UPDATED_TOKEN, 36 UPDATED_TOKEN,
37 37
38 // This is sent after the Syncer (and SyncerThread) have initiated self 38 // This is sent after the Syncer (and SyncerThread) have initiated self
39 // halt due to no longer being permitted to communicate with the server. 39 // halt due to no longer being permitted to communicate with the server.
40 // The listener should sever the sync / browser connections and delete sync 40 // The listener should sever the sync / browser connections and delete sync
41 // data (i.e. as if the user clicked 'Stop Syncing' in the browser. 41 // data (i.e. as if the user clicked 'Stop Syncing' in the browser.
42 STOP_SYNCING_PERMANENTLY, 42 STOP_SYNCING_PERMANENTLY,
43 43
44 // These events are sent to indicate when we know the clearing of
45 // server data have failed or succeeded.
46 CLEAR_SERVER_DATA_SUCCEEDED,
47 CLEAR_SERVER_DATA_FAILED,
48
49 // This event is sent when we receive an actionable error. It is upto 44 // This event is sent when we receive an actionable error. It is upto
50 // the listeners to figure out the action to take using the snapshot sent. 45 // the listeners to figure out the action to take using the snapshot sent.
51 ACTIONABLE_ERROR, 46 ACTIONABLE_ERROR,
52 }; 47 };
53 48
54 explicit SyncEngineEvent(EventCause cause); 49 explicit SyncEngineEvent(EventCause cause);
55 ~SyncEngineEvent(); 50 ~SyncEngineEvent();
56 51
57 EventCause what_happened; 52 EventCause what_happened;
58 53
59 // The last session used for syncing. 54 // The last session used for syncing.
60 sessions::SyncSessionSnapshot snapshot; 55 sessions::SyncSessionSnapshot snapshot;
61 56
62 // Update-Client-Auth returns a new token for sync use. 57 // Update-Client-Auth returns a new token for sync use.
63 std::string updated_token; 58 std::string updated_token;
64 }; 59 };
65 60
66 class SyncEngineEventListener { 61 class SyncEngineEventListener {
67 public: 62 public:
68 // TODO(tim): Consider splitting this up to multiple callbacks, rather than 63 // TODO(tim): Consider splitting this up to multiple callbacks, rather than
69 // have to do Event e(type); OnSyncEngineEvent(e); at all callsites, 64 // have to do Event e(type); OnSyncEngineEvent(e); at all callsites,
70 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) = 0; 65 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) = 0;
71 protected: 66 protected:
72 virtual ~SyncEngineEventListener() {} 67 virtual ~SyncEngineEventListener() {}
73 }; 68 };
74 69
75 } // namespace browser_sync 70 } // namespace browser_sync
76 71
77 #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 72 #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
OLDNEW
« no previous file with comments | « sync/engine/clear_data_command_unittest.cc ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698