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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 11445002: Sync user's custom spellcheck dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add browser tests for dictionary change notifications in settings Created 7 years, 11 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 (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 "chrome/browser/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 sync_everything(false), 67 sync_everything(false),
68 passphrase_is_gaia(false) { 68 passphrase_is_gaia(false) {
69 } 69 }
70 70
71 SyncConfigInfo::~SyncConfigInfo() {} 71 SyncConfigInfo::~SyncConfigInfo() {}
72 72
73 const char* kDataTypeNames[] = { 73 const char* kDataTypeNames[] = {
74 "apps", 74 "apps",
75 "autofill", 75 "autofill",
76 "bookmarks", 76 "bookmarks",
77 "dictionary",
77 "extensions", 78 "extensions",
78 "passwords", 79 "passwords",
79 "preferences", 80 "preferences",
80 "sessions", 81 "sessions",
81 "themes", 82 "themes",
82 "typedUrls" 83 "typedUrls"
83 }; 84 };
84 85
85 const syncer::ModelType kDataTypes[] = { 86 const syncer::ModelType kDataTypes[] = {
86 syncer::APPS, 87 syncer::APPS,
87 syncer::AUTOFILL, 88 syncer::AUTOFILL,
88 syncer::BOOKMARKS, 89 syncer::BOOKMARKS,
90 syncer::DICTIONARY,
89 syncer::EXTENSIONS, 91 syncer::EXTENSIONS,
90 syncer::PASSWORDS, 92 syncer::PASSWORDS,
91 syncer::PREFERENCES, 93 syncer::PREFERENCES,
92 syncer::SESSIONS, 94 syncer::SESSIONS,
93 syncer::THEMES, 95 syncer::THEMES,
94 syncer::TYPED_URLS 96 syncer::TYPED_URLS
95 }; 97 };
96 98
97 static const size_t kNumDataTypes = arraysize(kDataTypes); 99 static const size_t kNumDataTypes = arraysize(kDataTypes);
98 COMPILE_ASSERT(arraysize(kDataTypeNames) == arraysize(kDataTypes), 100 COMPILE_ASSERT(arraysize(kDataTypeNames) == arraysize(kDataTypes),
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 { "chooseDataTypes", IDS_SYNC_CHOOSE_DATATYPES }, 332 { "chooseDataTypes", IDS_SYNC_CHOOSE_DATATYPES },
331 { "bookmarks", IDS_SYNC_DATATYPE_BOOKMARKS }, 333 { "bookmarks", IDS_SYNC_DATATYPE_BOOKMARKS },
332 { "preferences", IDS_SYNC_DATATYPE_PREFERENCES }, 334 { "preferences", IDS_SYNC_DATATYPE_PREFERENCES },
333 { "autofill", IDS_SYNC_DATATYPE_AUTOFILL }, 335 { "autofill", IDS_SYNC_DATATYPE_AUTOFILL },
334 { "themes", IDS_SYNC_DATATYPE_THEMES }, 336 { "themes", IDS_SYNC_DATATYPE_THEMES },
335 { "passwords", IDS_SYNC_DATATYPE_PASSWORDS }, 337 { "passwords", IDS_SYNC_DATATYPE_PASSWORDS },
336 { "extensions", IDS_SYNC_DATATYPE_EXTENSIONS }, 338 { "extensions", IDS_SYNC_DATATYPE_EXTENSIONS },
337 { "typedURLs", IDS_SYNC_DATATYPE_TYPED_URLS }, 339 { "typedURLs", IDS_SYNC_DATATYPE_TYPED_URLS },
338 { "apps", IDS_SYNC_DATATYPE_APPS }, 340 { "apps", IDS_SYNC_DATATYPE_APPS },
339 { "openTabs", IDS_SYNC_DATATYPE_TABS }, 341 { "openTabs", IDS_SYNC_DATATYPE_TABS },
342 { "dictionary", IDS_SYNC_DATATYPE_DICTIONARY },
340 { "syncZeroDataTypesError", IDS_SYNC_ZERO_DATA_TYPES_ERROR }, 343 { "syncZeroDataTypesError", IDS_SYNC_ZERO_DATA_TYPES_ERROR },
341 { "serviceUnavailableError", IDS_SYNC_SETUP_ABORTED_BY_PENDING_CLEAR }, 344 { "serviceUnavailableError", IDS_SYNC_SETUP_ABORTED_BY_PENDING_CLEAR },
342 { "googleOption", IDS_SYNC_PASSPHRASE_OPT_GOOGLE }, 345 { "googleOption", IDS_SYNC_PASSPHRASE_OPT_GOOGLE },
343 { "explicitOption", IDS_SYNC_PASSPHRASE_OPT_EXPLICIT }, 346 { "explicitOption", IDS_SYNC_PASSPHRASE_OPT_EXPLICIT },
344 { "sectionGoogleMessage", IDS_SYNC_PASSPHRASE_MSG_GOOGLE }, 347 { "sectionGoogleMessage", IDS_SYNC_PASSPHRASE_MSG_GOOGLE },
345 { "sectionExplicitMessage", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT }, 348 { "sectionExplicitMessage", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT },
346 { "passphraseLabel", IDS_SYNC_PASSPHRASE_LABEL }, 349 { "passphraseLabel", IDS_SYNC_PASSPHRASE_LABEL },
347 { "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL }, 350 { "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL },
348 { "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR }, 351 { "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR },
349 { "mismatchErrorMessage", IDS_SYNC_PASSPHRASE_MISMATCH_ERROR }, 352 { "mismatchErrorMessage", IDS_SYNC_PASSPHRASE_MISMATCH_ERROR },
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 if (i != current_profile_index && AreUserNamesEqual( 1224 if (i != current_profile_index && AreUserNamesEqual(
1222 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) { 1225 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) {
1223 *error_message = l10n_util::GetStringUTF16( 1226 *error_message = l10n_util::GetStringUTF16(
1224 IDS_SYNC_USER_NAME_IN_USE_ERROR); 1227 IDS_SYNC_USER_NAME_IN_USE_ERROR);
1225 return false; 1228 return false;
1226 } 1229 }
1227 } 1230 }
1228 1231
1229 return true; 1232 return true;
1230 } 1233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698