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 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 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) 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const std::string& boostrap_token) { 85 const std::string& boostrap_token) {
86 if (!event_handler_.IsInitialized()) { 86 if (!event_handler_.IsInitialized()) {
87 return; 87 return;
88 } 88 }
89 DictionaryValue details; 89 DictionaryValue details;
90 details.SetString("bootstrapToken", "<redacted>"); 90 details.SetString("bootstrapToken", "<redacted>");
91 HandleJsEvent(FROM_HERE, "OnBootstrapTokenUpdated", JsEventDetails(&details)); 91 HandleJsEvent(FROM_HERE, "OnBootstrapTokenUpdated", JsEventDetails(&details));
92 } 92 }
93 93
94 void JsSyncManagerObserver::OnEncryptedTypesChanged( 94 void JsSyncManagerObserver::OnEncryptedTypesChanged(
95 syncable::ModelTypeSet encrypted_types, 95 syncer::ModelTypeSet encrypted_types,
96 bool encrypt_everything) { 96 bool encrypt_everything) {
97 if (!event_handler_.IsInitialized()) { 97 if (!event_handler_.IsInitialized()) {
98 return; 98 return;
99 } 99 }
100 DictionaryValue details; 100 DictionaryValue details;
101 details.Set("encryptedTypes", 101 details.Set("encryptedTypes",
102 syncable::ModelTypeSetToValue(encrypted_types)); 102 syncer::ModelTypeSetToValue(encrypted_types));
103 details.SetBoolean("encryptEverything", encrypt_everything); 103 details.SetBoolean("encryptEverything", encrypt_everything);
104 HandleJsEvent(FROM_HERE, 104 HandleJsEvent(FROM_HERE,
105 "onEncryptedTypesChanged", JsEventDetails(&details)); 105 "onEncryptedTypesChanged", JsEventDetails(&details));
106 } 106 }
107 107
108 void JsSyncManagerObserver::OnEncryptionComplete() { 108 void JsSyncManagerObserver::OnEncryptionComplete() {
109 if (!event_handler_.IsInitialized()) { 109 if (!event_handler_.IsInitialized()) {
110 return; 110 return;
111 } 111 }
112 DictionaryValue details; 112 DictionaryValue details;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const std::string& name, const JsEventDetails& details) { 147 const std::string& name, const JsEventDetails& details) {
148 if (!event_handler_.IsInitialized()) { 148 if (!event_handler_.IsInitialized()) {
149 NOTREACHED(); 149 NOTREACHED();
150 return; 150 return;
151 } 151 }
152 event_handler_.Call(from_here, 152 event_handler_.Call(from_here,
153 &JsEventHandler::HandleJsEvent, name, details); 153 &JsEventHandler::HandleJsEvent, name, details);
154 } 154 }
155 155
156 } // namespace syncer 156 } // 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