| OLD | NEW |
| 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/chromeos/extensions/input_method_api.h" | 5 #include "chrome/browser/chromeos/extensions/input_method_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // - Empty. | 204 // - Empty. |
| 205 return RespondNow(Error("Unable to add invalid word to dictionary.")); | 205 return RespondNow(Error("Unable to add invalid word to dictionary.")); |
| 206 #endif | 206 #endif |
| 207 } | 207 } |
| 208 | 208 |
| 209 ExtensionFunction::ResponseAction | 209 ExtensionFunction::ResponseAction |
| 210 InputMethodPrivateGetEncryptSyncEnabledFunction::Run() { | 210 InputMethodPrivateGetEncryptSyncEnabledFunction::Run() { |
| 211 #if !defined(OS_CHROMEOS) | 211 #if !defined(OS_CHROMEOS) |
| 212 EXTENSION_FUNCTION_VALIDATE(false); | 212 EXTENSION_FUNCTION_VALIDATE(false); |
| 213 #else | 213 #else |
| 214 ProfileSyncService* profile_sync_service = | 214 browser_sync::ProfileSyncService* profile_sync_service = |
| 215 ProfileSyncServiceFactory::GetForProfile( | 215 ProfileSyncServiceFactory::GetForProfile( |
| 216 Profile::FromBrowserContext(browser_context())); | 216 Profile::FromBrowserContext(browser_context())); |
| 217 if (!profile_sync_service) | 217 if (!profile_sync_service) |
| 218 return RespondNow(Error("Sync service is not ready for current profile.")); | 218 return RespondNow(Error("Sync service is not ready for current profile.")); |
| 219 std::unique_ptr<base::Value> ret(new base::FundamentalValue( | 219 std::unique_ptr<base::Value> ret(new base::FundamentalValue( |
| 220 profile_sync_service->IsEncryptEverythingEnabled())); | 220 profile_sync_service->IsEncryptEverythingEnabled())); |
| 221 return RespondNow(OneArgument(std::move(ret))); | 221 return RespondNow(OneArgument(std::move(ret))); |
| 222 #endif | 222 #endif |
| 223 } | 223 } |
| 224 | 224 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > | 369 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > |
| 370 g_factory = LAZY_INSTANCE_INITIALIZER; | 370 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 371 | 371 |
| 372 // static | 372 // static |
| 373 BrowserContextKeyedAPIFactory<InputMethodAPI>* | 373 BrowserContextKeyedAPIFactory<InputMethodAPI>* |
| 374 InputMethodAPI::GetFactoryInstance() { | 374 InputMethodAPI::GetFactoryInstance() { |
| 375 return g_factory.Pointer(); | 375 return g_factory.Pointer(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 } // namespace extensions | 378 } // namespace extensions |
| OLD | NEW |