constants.cc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/services/ime/constants.h"
  5. #include <string.h>
  6. #include "base/files/file_util.h"
  7. #include "build/branding_buildflags.h"
  8. #define FPL FILE_PATH_LITERAL
  9. #define IME_DIR_STRING "input_methods"
  10. namespace ash {
  11. namespace ime {
  12. const base::FilePath::CharType kInputMethodsDirName[] =
  13. FILE_PATH_LITERAL(IME_DIR_STRING);
  14. #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
  15. const base::FilePath::CharType kBundledInputMethodsDirPath[] =
  16. FILE_PATH_LITERAL("/usr/share/chromeos-assets/input_methods/input_tools");
  17. const base::FilePath::CharType kUserInputMethodsDirPath[] =
  18. FILE_PATH_LITERAL("/home/chronos/user/" IME_DIR_STRING);
  19. const base::FilePath::CharType kLanguageDataDirName[] =
  20. FILE_PATH_LITERAL("google");
  21. #else
  22. // IME service does not support third-party IME yet, so the paths below kind
  23. // of act like a placeholder. In the future, put some well-designed paths here.
  24. const base::FilePath::CharType kBundledInputMethodsDirPath[] =
  25. FILE_PATH_LITERAL("/tmp/" IME_DIR_STRING);
  26. const base::FilePath::CharType kUserInputMethodsDirPath[] =
  27. FILE_PATH_LITERAL("/tmp/" IME_DIR_STRING);
  28. const base::FilePath::CharType kLanguageDataDirName[] =
  29. FILE_PATH_LITERAL("data");
  30. #endif
  31. const char kGoogleKeyboardDownloadDomain[] = "dl.google.com";
  32. } // namespace ime
  33. } // namespace ash