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 <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ExtensionFunction::ResponseAction | 210 ExtensionFunction::ResponseAction |
211 InputMethodPrivateGetEncryptSyncEnabledFunction::Run() { | 211 InputMethodPrivateGetEncryptSyncEnabledFunction::Run() { |
212 #if !defined(OS_CHROMEOS) | 212 #if !defined(OS_CHROMEOS) |
213 EXTENSION_FUNCTION_VALIDATE(false); | 213 EXTENSION_FUNCTION_VALIDATE(false); |
214 #else | 214 #else |
215 browser_sync::ProfileSyncService* profile_sync_service = | 215 browser_sync::ProfileSyncService* profile_sync_service = |
216 ProfileSyncServiceFactory::GetForProfile( | 216 ProfileSyncServiceFactory::GetForProfile( |
217 Profile::FromBrowserContext(browser_context())); | 217 Profile::FromBrowserContext(browser_context())); |
218 if (!profile_sync_service) | 218 if (!profile_sync_service) |
219 return RespondNow(Error("Sync service is not ready for current profile.")); | 219 return RespondNow(Error("Sync service is not ready for current profile.")); |
220 std::unique_ptr<base::Value> ret(new base::FundamentalValue( | 220 std::unique_ptr<base::Value> ret( |
221 profile_sync_service->IsEncryptEverythingEnabled())); | 221 new base::Value(profile_sync_service->IsEncryptEverythingEnabled())); |
222 return RespondNow(OneArgument(std::move(ret))); | 222 return RespondNow(OneArgument(std::move(ret))); |
223 #endif | 223 #endif |
224 } | 224 } |
225 | 225 |
226 ExtensionFunction::ResponseAction | 226 ExtensionFunction::ResponseAction |
227 InputMethodPrivateSetXkbLayoutFunction::Run() { | 227 InputMethodPrivateSetXkbLayoutFunction::Run() { |
228 #if !defined(OS_CHROMEOS) | 228 #if !defined(OS_CHROMEOS) |
229 EXTENSION_FUNCTION_VALIDATE(false); | 229 EXTENSION_FUNCTION_VALIDATE(false); |
230 #else | 230 #else |
231 std::unique_ptr<SetXkbLayout::Params> params( | 231 std::unique_ptr<SetXkbLayout::Params> params( |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > | 370 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > |
371 g_factory = LAZY_INSTANCE_INITIALIZER; | 371 g_factory = LAZY_INSTANCE_INITIALIZER; |
372 | 372 |
373 // static | 373 // static |
374 BrowserContextKeyedAPIFactory<InputMethodAPI>* | 374 BrowserContextKeyedAPIFactory<InputMethodAPI>* |
375 InputMethodAPI::GetFactoryInstance() { | 375 InputMethodAPI::GetFactoryInstance() { |
376 return g_factory.Pointer(); | 376 return g_factory.Pointer(); |
377 } | 377 } |
378 | 378 |
379 } // namespace extensions | 379 } // namespace extensions |
OLD | NEW |