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

Side by Side Diff: sync/internal_api/js_sync_manager_observer.cc

Issue 153643006: sync: Remove dead code related to ClearUserData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 #include "sync/internal_api/js_sync_manager_observer.h" 5 #include "sync/internal_api/js_sync_manager_observer.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // JSON anyway. 71 // JSON anyway.
72 72
73 base::DictionaryValue details; 73 base::DictionaryValue details;
74 details.Set("restoredTypes", ModelTypeSetToValue(restored_types)); 74 details.Set("restoredTypes", ModelTypeSetToValue(restored_types));
75 75
76 HandleJsEvent(FROM_HERE, 76 HandleJsEvent(FROM_HERE,
77 "onInitializationComplete", 77 "onInitializationComplete",
78 JsEventDetails(&details)); 78 JsEventDetails(&details));
79 } 79 }
80 80
81 void JsSyncManagerObserver::OnStopSyncingPermanently() {
82 if (!event_handler_.IsInitialized()) {
83 return;
84 }
85 HandleJsEvent(FROM_HERE, "onStopSyncingPermanently", JsEventDetails());
86 }
87
88 void JsSyncManagerObserver::HandleJsEvent( 81 void JsSyncManagerObserver::HandleJsEvent(
89 const tracked_objects::Location& from_here, 82 const tracked_objects::Location& from_here,
90 const std::string& name, const JsEventDetails& details) { 83 const std::string& name, const JsEventDetails& details) {
91 if (!event_handler_.IsInitialized()) { 84 if (!event_handler_.IsInitialized()) {
92 NOTREACHED(); 85 NOTREACHED();
93 return; 86 return;
94 } 87 }
95 event_handler_.Call(from_here, 88 event_handler_.Call(from_here,
96 &JsEventHandler::HandleJsEvent, name, details); 89 &JsEventHandler::HandleJsEvent, name, details);
97 } 90 }
98 91
99 } // namespace syncer 92 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/js_sync_manager_observer.h ('k') | sync/internal_api/js_sync_manager_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698