OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 cr.exportPath('settings'); | 5 cr.exportPath('settings'); |
6 | 6 |
7 /** | 7 /** |
8 * The state of sync. This is the data structure sent back and forth between | 8 * The state of sync. This is the data structure sent back and forth between |
9 * C++ and JS. Its naming and structure is not optimal, but changing it would | 9 * C++ and JS. Its naming and structure is not optimal, but changing it would |
10 * require changes to the C++ handler, which is already functional. | 10 * require changes to the C++ handler, which is already functional. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 chrome.send('setProfileIconAndName', [iconUrl, name]); | 149 chrome.send('setProfileIconAndName', [iconUrl, name]); |
150 }; | 150 }; |
151 </if> | 151 </if> |
152 | 152 |
153 /** | 153 /** |
154 * Starts the signin process for the user. Does nothing if the user is | 154 * Starts the signin process for the user. Does nothing if the user is |
155 * already signed in. | 155 * already signed in. |
156 * @private | 156 * @private |
157 */ | 157 */ |
158 SyncPrivateApi.startSignIn = function() { | 158 SyncPrivateApi.startSignIn = function() { |
159 chrome.send('SyncSetupStartSignIn'); | 159 // TODO(tommycli): Currently this is always false, but this will become |
| 160 // a parameter once supervised users are implemented in MD Settings. |
| 161 var creatingSupervisedUser = false; |
| 162 chrome.send('SyncSetupStartSignIn', [creatingSupervisedUser]); |
160 }; | 163 }; |
161 | 164 |
162 /** | 165 /** |
163 * Disconnects the signed in user. | 166 * Disconnects the signed in user. |
164 * @param {!boolean} deleteProfile | 167 * @param {!boolean} deleteProfile |
165 * @private | 168 * @private |
166 */ | 169 */ |
167 SyncPrivateApi.disconnect = function(deleteProfile) { | 170 SyncPrivateApi.disconnect = function(deleteProfile) { |
168 chrome.send('SyncSetupStopSyncing', [deleteProfile]); | 171 chrome.send('SyncSetupStopSyncing', [deleteProfile]); |
169 }; | 172 }; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 break; | 288 break; |
286 default: | 289 default: |
287 // Other statuses (i.e. "spinner") are ignored. | 290 // Other statuses (i.e. "spinner") are ignored. |
288 } | 291 } |
289 }; | 292 }; |
290 | 293 |
291 return { | 294 return { |
292 SyncPrivateApi: SyncPrivateApi, | 295 SyncPrivateApi: SyncPrivateApi, |
293 }; | 296 }; |
294 }); | 297 }); |
OLD | NEW |