summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authormariakhomenko@chromium.org <mariakhomenko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-31 07:48:53 +0000
committermariakhomenko@chromium.org <mariakhomenko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-31 07:48:53 +0000
commitc6ce08078b24a4ef2b0fd86c40001ad87b9c2b8c (patch)
treec0a63bebd88bcfb8866b69958aa2c7394e1b1f71 /chrome/browser/sync
parent2dc40fdb4cfa1f40ba4f85d3035cf791a139ab1c (diff)
downloadchromium_src-c6ce08078b24a4ef2b0fd86c40001ad87b9c2b8c.zip
chromium_src-c6ce08078b24a4ef2b0fd86c40001ad87b9c2b8c.tar.gz
chromium_src-c6ce08078b24a4ef2b0fd86c40001ad87b9c2b8c.tar.bz2
Creates a flag to enable/disable spellchecker.
Add a flag to remove spell-checking inside form fields on Chrome. Disable the flag for android -- we cannot interact with the spellchecker, so it doesn't make sense to have it. This saves us ~300K memory on startup. BUG=264837 Review URL: https://chromiumcodereview.appspot.com/20794002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_impl.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index 0c9c47b..0ce7f9f 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -21,8 +21,6 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/spellchecker/spellcheck_factory.h"
-#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/sync/glue/autofill_data_type_controller.h"
#include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
@@ -76,6 +74,11 @@
#include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h"
#endif
+#if defined(ENABLE_SPELLCHECK)
+#include "chrome/browser/spellchecker/spellcheck_factory.h"
+#include "chrome/browser/spellchecker/spellcheck_service.h"
+#endif
+
using browser_sync::AutofillDataTypeController;
using browser_sync::AutofillProfileDataTypeController;
using browser_sync::BookmarkChangeProcessor;
@@ -377,9 +380,11 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
: base::WeakPtr<syncer::SyncableService>();
}
#endif
+#if defined(ENABLE_SPELLCHECK)
case syncer::DICTIONARY:
return SpellcheckServiceFactory::GetForProfile(profile_)->
GetCustomDictionary()->AsWeakPtr();
+#endif
case syncer::FAVICON_IMAGES:
case syncer::FAVICON_TRACKING: {
browser_sync::SessionModelAssociator* model_associator =