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_encryption_handler_observer.cc

Issue 10878015: [Sync] Move keystore key handling to SyncEncryptionHandlerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_encryption_handler_observer.h" 5 #include "sync/internal_api/js_sync_encryption_handler_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void JsSyncEncryptionHandlerObserver::OnPassphraseAccepted() { 43 void JsSyncEncryptionHandlerObserver::OnPassphraseAccepted() {
44 if (!event_handler_.IsInitialized()) { 44 if (!event_handler_.IsInitialized()) {
45 return; 45 return;
46 } 46 }
47 DictionaryValue details; 47 DictionaryValue details;
48 HandleJsEvent(FROM_HERE, "onPassphraseAccepted", JsEventDetails(&details)); 48 HandleJsEvent(FROM_HERE, "onPassphraseAccepted", JsEventDetails(&details));
49 } 49 }
50 50
51 void JsSyncEncryptionHandlerObserver::OnBootstrapTokenUpdated( 51 void JsSyncEncryptionHandlerObserver::OnBootstrapTokenUpdated(
52 const std::string& boostrap_token) { 52 const std::string& boostrap_token,
53 BootstrapTokenType type) {
53 if (!event_handler_.IsInitialized()) { 54 if (!event_handler_.IsInitialized()) {
54 return; 55 return;
55 } 56 }
56 DictionaryValue details; 57 DictionaryValue details;
57 details.SetString("bootstrapToken", "<redacted>"); 58 details.SetString("bootstrapTokenUpdated",
akalin 2012/08/22 22:09:33 clearer to keep the redacted bootstrapToken key an
Nicolas Zea 2012/08/22 22:48:59 Done.
59 BootstrapTokenTypeToString(type));
58 HandleJsEvent(FROM_HERE, "OnBootstrapTokenUpdated", JsEventDetails(&details)); 60 HandleJsEvent(FROM_HERE, "OnBootstrapTokenUpdated", JsEventDetails(&details));
59 } 61 }
60 62
61 void JsSyncEncryptionHandlerObserver::OnEncryptedTypesChanged( 63 void JsSyncEncryptionHandlerObserver::OnEncryptedTypesChanged(
62 ModelTypeSet encrypted_types, 64 ModelTypeSet encrypted_types,
63 bool encrypt_everything) { 65 bool encrypt_everything) {
64 if (!event_handler_.IsInitialized()) { 66 if (!event_handler_.IsInitialized()) {
65 return; 67 return;
66 } 68 }
67 DictionaryValue details; 69 DictionaryValue details;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 const std::string& name, const JsEventDetails& details) { 115 const std::string& name, const JsEventDetails& details) {
114 if (!event_handler_.IsInitialized()) { 116 if (!event_handler_.IsInitialized()) {
115 NOTREACHED(); 117 NOTREACHED();
116 return; 118 return;
117 } 119 }
118 event_handler_.Call(from_here, 120 event_handler_.Call(from_here,
119 &JsEventHandler::HandleJsEvent, name, details); 121 &JsEventHandler::HandleJsEvent, name, details);
120 } 122 }
121 123
122 } // namespace syncer 124 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698