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

Side by Side Diff: chrome/browser/resources/settings/people_page/users_add_user_dialog.js

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-users-add-user-dialog' is the dialog shown for adding new allowed 7 * 'settings-users-add-user-dialog' is the dialog shown for adding new allowed
8 * users to a ChromeOS device. 8 * users to a ChromeOS device.
9 */ 9 */
10 (function() { 10 (function() {
11 11
12 /** 12 /**
13 * Regular expression for adding a user where the string provided is just 13 * Regular expression for adding a user where the string provided is just
14 * the part before the "@". 14 * the part before the "@".
15 * Email alias only, assuming it's a gmail address. 15 * Email alias only, assuming it's a gmail address.
16 * e.g. 'john' 16 * e.g. 'john'
17 * @const {!RegExp} 17 * @const {!RegExp}
18 */ 18 */
19 var NAME_ONLY_REGEX = new RegExp( 19 var NAME_ONLY_REGEX =
20 '^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)\\s*$'); 20 new RegExp('^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)\\s*$');
21 21
22 /** 22 /**
23 * Regular expression for adding a user where the string provided is a full 23 * Regular expression for adding a user where the string provided is a full
24 * email address. 24 * email address.
25 * e.g. 'john@chromium.org' 25 * e.g. 'john@chromium.org'
26 * @const {!RegExp} 26 * @const {!RegExp}
27 */ 27 */
28 var EMAIL_REGEX = new RegExp( 28 var EMAIL_REGEX = new RegExp(
29 '^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)@' + 29 '^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)@' +
30 '([A-Za-z0-9\-]{2,63}\\..+)\\s*$'); 30 '([A-Za-z0-9\-]{2,63}\\..+)\\s*$');
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 chrome.usersPrivate.addWhitelistedUser( 83 chrome.usersPrivate.addWhitelistedUser(
84 userEmail, 84 userEmail,
85 /* callback */ function(success) {}); 85 /* callback */ function(success) {});
86 this.$.addUserInput.value = ''; 86 this.$.addUserInput.value = '';
87 this.$.dialog.close(); 87 this.$.dialog.close();
88 }, 88 },
89 }); 89 });
90 90
91 })(); 91 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/sync_page.js ('k') | chrome/browser/resources/settings/prefs/pref_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698