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/default_app_order.h" | 5 #include "chrome/browser/chromeos/extensions/default_app_order.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/json/json_file_value_serializer.h" | 11 #include "base/json/json_file_value_serializer.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/common/extensions/extension_constants.h" | 15 #include "chrome/common/extensions/extension_constants.h" |
16 #include "chromeos/chromeos_paths.h" | 16 #include "chromeos/chromeos_paths.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "extensions/common/constants.h" |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 namespace default_app_order { | 21 namespace default_app_order { |
21 namespace { | 22 namespace { |
22 | 23 |
23 // The single ExternalLoader instance. | 24 // The single ExternalLoader instance. |
24 ExternalLoader* loader_instance = NULL; | 25 ExternalLoader* loader_instance = NULL; |
25 | 26 |
26 // Names used in JSON file. | 27 // Names used in JSON file. |
27 const char kOemAppsFolderAttr[] = "oem_apps_folder"; | 28 const char kOemAppsFolderAttr[] = "oem_apps_folder"; |
28 const char kLocalizedContentAttr[] = "localized_content"; | 29 const char kLocalizedContentAttr[] = "localized_content"; |
29 const char kDefaultAttr[] = "default"; | 30 const char kDefaultAttr[] = "default"; |
30 const char kNameAttr[] = "name"; | 31 const char kNameAttr[] = "name"; |
31 const char kImportDefaultOrderAttr[] = "import_default_order"; | 32 const char kImportDefaultOrderAttr[] = "import_default_order"; |
32 | 33 |
33 const char* kDefaultAppOrder[] = { | 34 const char* kDefaultAppOrder[] = { |
34 extension_misc::kChromeAppId, | 35 extension_misc::kChromeAppId, |
35 extension_misc::kWebStoreAppId, | 36 extensions::kWebStoreAppId, |
36 extension_misc::kGoogleSearchAppId, | 37 extension_misc::kGoogleSearchAppId, |
37 extension_misc::kYoutubeAppId, | 38 extension_misc::kYoutubeAppId, |
38 extension_misc::kGmailAppId, | 39 extension_misc::kGmailAppId, |
39 "ejjicmeblgpmajnghnpcppodonldlgfn", // Calendar | 40 "ejjicmeblgpmajnghnpcppodonldlgfn", // Calendar |
40 "kjebfhglflhjjjiceimfkgicifkhjlnm", // Scratchpad | 41 "kjebfhglflhjjjiceimfkgicifkhjlnm", // Scratchpad |
41 "lneaknkopdijkpnocmklfnjbeapigfbh", // Google Maps | 42 "lneaknkopdijkpnocmklfnjbeapigfbh", // Google Maps |
42 "apdfllckaahabafndbhieahigkjlhalf", // Drive | 43 "apdfllckaahabafndbhieahigkjlhalf", // Drive |
43 extension_misc::kGoogleDocAppId, | 44 extension_misc::kGoogleDocAppId, |
44 extension_misc::kGoogleSheetsAppId, | 45 extension_misc::kGoogleSheetsAppId, |
45 extension_misc::kGoogleSlidesAppId, | 46 extension_misc::kGoogleSlidesAppId, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 std::string GetOemAppsFolderName() { | 194 std::string GetOemAppsFolderName() { |
194 // |loader_instance| could be NULL for test. | 195 // |loader_instance| could be NULL for test. |
195 if (!loader_instance) | 196 if (!loader_instance) |
196 return std::string(); | 197 return std::string(); |
197 else | 198 else |
198 return loader_instance->GetOemAppsFolderName(); | 199 return loader_instance->GetOemAppsFolderName(); |
199 } | 200 } |
200 | 201 |
201 } // namespace default_app_order | 202 } // namespace default_app_order |
202 } // namespace chromeos | 203 } // namespace chromeos |
OLD | NEW |