Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / external_provider_impl.cc
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/external_provider_impl.h"
6
7 #include <set>
8 #include <vector>
9
10 #include "base/command_line.h"
11 #include "base/files/file_path.h"
12 #include "base/logging.h"
13 #include "base/memory/linked_ptr.h"
14 #include "base/metrics/field_trial.h"
15 #include "base/strings/string_util.h"
16 #include "base/values.h"
17 #include "base/version.h"
18 #include "chrome/browser/app_mode/app_mode_utils.h"
19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/extensions/extension_management.h"
21 #include "chrome/browser/extensions/extension_service.h"
22 #include "chrome/browser/extensions/external_component_loader.h"
23 #include "chrome/browser/extensions/external_policy_loader.h"
24 #include "chrome/browser/extensions/external_pref_loader.h"
25 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h"
28 #include "components/crx_file/id_util.h"
29 #include "content/public/browser/browser_thread.h"
30 #include "extensions/browser/extension_system.h"
31 #include "extensions/browser/external_provider_interface.h"
32 #include "extensions/common/extension.h"
33 #include "extensions/common/manifest.h"
34 #include "ui/base/l10n/l10n_util.h"
35
36 #if defined(OS_CHROMEOS)
37 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
38 #include "chrome/browser/chromeos/customization_document.h"
39 #include "chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h"
40 #include "chrome/browser/chromeos/policy/app_pack_updater.h"
41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
42 #include "chrome/browser/chromeos/policy/device_local_account.h"
43 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
44 #include "chrome/browser/chromeos/profiles/profile_helper.h"
45 #include "components/user_manager/user.h"
46 #include "components/user_manager/user_manager.h"
47 #else
48 #include "chrome/browser/extensions/default_apps.h"
49 #endif
50
51 #if defined(OS_WIN)
52 #include "chrome/browser/extensions/external_registry_loader_win.h"
53 #endif
54
55 using content::BrowserThread;
56
57 namespace extensions {
58
59 // Constants for keeping track of extension preferences in a dictionary.
60 const char ExternalProviderImpl::kInstallParam[] = "install_parameter";
61 const char ExternalProviderImpl::kExternalCrx[] = "external_crx";
62 const char ExternalProviderImpl::kExternalVersion[] = "external_version";
63 const char ExternalProviderImpl::kExternalUpdateUrl[] = "external_update_url";
64 const char ExternalProviderImpl::kIsBookmarkApp[] = "is_bookmark_app";
65 const char ExternalProviderImpl::kIsFromWebstore[] = "is_from_webstore";
66 const char ExternalProviderImpl::kKeepIfPresent[] = "keep_if_present";
67 const char ExternalProviderImpl::kWasInstalledByOem[] = "was_installed_by_oem";
68 const char ExternalProviderImpl::kSupportedLocales[] = "supported_locales";
69 const char ExternalProviderImpl::kMayBeUntrusted[] = "may_be_untrusted";
70
71 ExternalProviderImpl::ExternalProviderImpl(
72     VisitorInterface* service,
73     const scoped_refptr<ExternalLoader>& loader,
74     Profile* profile,
75     Manifest::Location crx_location,
76     Manifest::Location download_location,
77     int creation_flags)
78     : crx_location_(crx_location),
79       download_location_(download_location),
80       service_(service),
81       ready_(false),
82       loader_(loader),
83       profile_(profile),
84       creation_flags_(creation_flags),
85       auto_acknowledge_(false) {
86   loader_->Init(this);
87 }
88
89 ExternalProviderImpl::~ExternalProviderImpl() {
90   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
91   loader_->OwnerShutdown();
92 }
93
94 void ExternalProviderImpl::VisitRegisteredExtension() {
95   // The loader will call back to SetPrefs.
96   loader_->StartLoading();
97 }
98
99 void ExternalProviderImpl::SetPrefs(base::DictionaryValue* prefs) {
100   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
101
102   // Check if the service is still alive. It is possible that it went
103   // away while |loader_| was working on the FILE thread.
104   if (!service_) return;
105
106   prefs_.reset(prefs);
107   ready_ = true;  // Queries for extensions are allowed from this point.
108
109   // Set of unsupported extensions that need to be deleted from prefs_.
110   std::set<std::string> unsupported_extensions;
111
112   // Notify ExtensionService about all the extensions this provider has.
113   for (base::DictionaryValue::Iterator i(*prefs_); !i.IsAtEnd(); i.Advance()) {
114     const std::string& extension_id = i.key();
115     const base::DictionaryValue* extension = NULL;
116
117     if (!crx_file::id_util::IdIsValid(extension_id)) {
118       LOG(WARNING) << "Malformed extension dictionary: key "
119                    << extension_id.c_str() << " is not a valid id.";
120       continue;
121     }
122
123     if (!i.value().GetAsDictionary(&extension)) {
124       LOG(WARNING) << "Malformed extension dictionary: key "
125                    << extension_id.c_str()
126                    << " has a value that is not a dictionary.";
127       continue;
128     }
129
130     base::FilePath::StringType external_crx;
131     const base::Value* external_version_value = NULL;
132     std::string external_version;
133     std::string external_update_url;
134
135     bool has_external_crx = extension->GetString(kExternalCrx, &external_crx);
136
137     bool has_external_version = false;
138     if (extension->Get(kExternalVersion, &external_version_value)) {
139       if (external_version_value->IsType(base::Value::TYPE_STRING)) {
140         external_version_value->GetAsString(&external_version);
141         has_external_version = true;
142       } else {
143         LOG(WARNING) << "Malformed extension dictionary for extension: "
144                      << extension_id.c_str() << ". " << kExternalVersion
145                      << " value must be a string.";
146         continue;
147       }
148     }
149
150     bool has_external_update_url = extension->GetString(kExternalUpdateUrl,
151                                                         &external_update_url);
152     if (has_external_crx != has_external_version) {
153       LOG(WARNING) << "Malformed extension dictionary for extension: "
154                    << extension_id.c_str() << ".  " << kExternalCrx
155                    << " and " << kExternalVersion << " must be used together.";
156       continue;
157     }
158
159     if (has_external_crx == has_external_update_url) {
160       LOG(WARNING) << "Malformed extension dictionary for extension: "
161                    << extension_id.c_str() << ".  Exactly one of the "
162                    << "followng keys should be used: " << kExternalCrx
163                    << ", " << kExternalUpdateUrl << ".";
164       continue;
165     }
166
167     // Check that extension supports current browser locale.
168     const base::ListValue* supported_locales = NULL;
169     if (extension->GetList(kSupportedLocales, &supported_locales)) {
170       std::vector<std::string> browser_locales;
171       l10n_util::GetParentLocales(g_browser_process->GetApplicationLocale(),
172                                   &browser_locales);
173
174       size_t num_locales = supported_locales->GetSize();
175       bool locale_supported = false;
176       for (size_t j = 0; j < num_locales; j++) {
177         std::string current_locale;
178         if (supported_locales->GetString(j, &current_locale) &&
179             l10n_util::IsValidLocaleSyntax(current_locale)) {
180           current_locale = l10n_util::NormalizeLocale(current_locale);
181           if (std::find(browser_locales.begin(), browser_locales.end(),
182                         current_locale) != browser_locales.end()) {
183             locale_supported = true;
184             break;
185           }
186         } else {
187           LOG(WARNING) << "Unrecognized locale '" << current_locale
188                        << "' found as supported locale for extension: "
189                        << extension_id;
190         }
191       }
192
193       if (!locale_supported) {
194         unsupported_extensions.insert(extension_id);
195         VLOG(1) << "Skip installing (or uninstall) external extension: "
196                 << extension_id << " because the extension doesn't support "
197                 << "the browser locale.";
198         continue;
199       }
200     }
201
202     int creation_flags = creation_flags_;
203     bool is_bookmark_app;
204     if (extension->GetBoolean(kIsBookmarkApp, &is_bookmark_app) &&
205         is_bookmark_app) {
206       creation_flags |= Extension::FROM_BOOKMARK;
207     }
208     bool is_from_webstore = false;
209     if (extension->GetBoolean(kIsFromWebstore, &is_from_webstore) &&
210         is_from_webstore) {
211       creation_flags |= Extension::FROM_WEBSTORE;
212     }
213     bool keep_if_present = false;
214     if (extension->GetBoolean(kKeepIfPresent, &keep_if_present) &&
215         keep_if_present && profile_) {
216       ExtensionServiceInterface* extension_service =
217           ExtensionSystem::Get(profile_)->extension_service();
218       const Extension* extension = extension_service ?
219           extension_service->GetExtensionById(extension_id, true) : NULL;
220       if (!extension) {
221         VLOG(1) << "Skip installing (or uninstall) external extension: "
222                 << extension_id << " because the extension should be kept "
223                 << "only if it is already installed.";
224         continue;
225       }
226     }
227     bool was_installed_by_oem = false;
228     if (extension->GetBoolean(kWasInstalledByOem, &was_installed_by_oem) &&
229         was_installed_by_oem) {
230       creation_flags |= Extension::WAS_INSTALLED_BY_OEM;
231     }
232     bool may_be_untrusted = false;
233     if (extension->GetBoolean(kMayBeUntrusted, &may_be_untrusted) &&
234         may_be_untrusted) {
235       creation_flags |= Extension::MAY_BE_UNTRUSTED;
236     }
237
238     std::string install_parameter;
239     extension->GetString(kInstallParam, &install_parameter);
240
241     if (has_external_crx) {
242       if (crx_location_ == Manifest::INVALID_LOCATION) {
243         LOG(WARNING) << "This provider does not support installing external "
244                      << "extensions from crx files.";
245         continue;
246       }
247       if (external_crx.find(base::FilePath::kParentDirectory) !=
248           base::StringPiece::npos) {
249         LOG(WARNING) << "Path traversal not allowed in path: "
250                      << external_crx.c_str();
251         continue;
252       }
253
254       // If the path is relative, and the provider has a base path,
255       // build the absolute path to the crx file.
256       base::FilePath path(external_crx);
257       if (!path.IsAbsolute()) {
258         base::FilePath base_path = loader_->GetBaseCrxFilePath();
259         if (base_path.empty()) {
260           LOG(WARNING) << "File path " << external_crx.c_str()
261                        << " is relative.  An absolute path is required.";
262           continue;
263         }
264         path = base_path.Append(external_crx);
265       }
266
267       Version version(external_version);
268       if (!version.IsValid()) {
269         LOG(WARNING) << "Malformed extension dictionary for extension: "
270                      << extension_id.c_str() << ".  Invalid version string \""
271                      << external_version << "\".";
272         continue;
273       }
274       service_->OnExternalExtensionFileFound(extension_id, &version, path,
275                                              crx_location_, creation_flags,
276                                              auto_acknowledge_);
277     } else {  // if (has_external_update_url)
278       CHECK(has_external_update_url);  // Checking of keys above ensures this.
279       if (download_location_ == Manifest::INVALID_LOCATION) {
280         LOG(WARNING) << "This provider does not support installing external "
281                      << "extensions from update URLs.";
282         continue;
283       }
284       GURL update_url(external_update_url);
285       if (!update_url.is_valid()) {
286         LOG(WARNING) << "Malformed extension dictionary for extension: "
287                      << extension_id.c_str() << ".  Key " << kExternalUpdateUrl
288                      << " has value \"" << external_update_url
289                      << "\", which is not a valid URL.";
290         continue;
291       }
292       service_->OnExternalExtensionUpdateUrlFound(extension_id,
293                                                   install_parameter,
294                                                   update_url,
295                                                   download_location_,
296                                                   creation_flags,
297                                                   auto_acknowledge_);
298     }
299   }
300
301   for (std::set<std::string>::iterator it = unsupported_extensions.begin();
302        it != unsupported_extensions.end(); ++it) {
303     // Remove extension for the list of know external extensions. The extension
304     // will be uninstalled later because provider doesn't provide it anymore.
305     prefs_->Remove(*it, NULL);
306   }
307
308   service_->OnExternalProviderReady(this);
309 }
310
311 void ExternalProviderImpl::ServiceShutdown() {
312   service_ = NULL;
313 }
314
315 bool ExternalProviderImpl::IsReady() const {
316   return ready_;
317 }
318
319 bool ExternalProviderImpl::HasExtension(
320     const std::string& id) const {
321   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
322   CHECK(prefs_.get());
323   CHECK(ready_);
324   return prefs_->HasKey(id);
325 }
326
327 bool ExternalProviderImpl::GetExtensionDetails(
328     const std::string& id, Manifest::Location* location,
329     scoped_ptr<Version>* version) const {
330   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
331   CHECK(prefs_.get());
332   CHECK(ready_);
333   base::DictionaryValue* extension = NULL;
334   if (!prefs_->GetDictionary(id, &extension))
335     return false;
336
337   Manifest::Location loc = Manifest::INVALID_LOCATION;
338   if (extension->HasKey(kExternalUpdateUrl)) {
339     loc = download_location_;
340
341   } else if (extension->HasKey(kExternalCrx)) {
342     loc = crx_location_;
343
344     std::string external_version;
345     if (!extension->GetString(kExternalVersion, &external_version))
346       return false;
347
348     if (version)
349       version->reset(new Version(external_version));
350
351   } else {
352     NOTREACHED();  // Chrome should not allow prefs to get into this state.
353     return false;
354   }
355
356   if (location)
357     *location = loc;
358
359   return true;
360 }
361
362 // static
363 void ExternalProviderImpl::CreateExternalProviders(
364     VisitorInterface* service,
365     Profile* profile,
366     ProviderCollection* provider_list) {
367   scoped_refptr<ExternalLoader> external_loader;
368   scoped_refptr<ExternalLoader> external_recommended_loader;
369   extensions::Manifest::Location crx_location = Manifest::INVALID_LOCATION;
370 #if defined(OS_CHROMEOS)
371   policy::BrowserPolicyConnectorChromeOS* connector =
372       g_browser_process->platform_part()->browser_policy_connector_chromeos();
373   bool is_chrome_os_public_session = false;
374   const user_manager::User* user =
375       chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
376   policy::DeviceLocalAccount::Type account_type;
377   if (user && policy::IsDeviceLocalAccountUser(user->email(), &account_type)) {
378     if (account_type == policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION)
379       is_chrome_os_public_session = true;
380     policy::DeviceLocalAccountPolicyBroker* broker =
381         connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser(
382             user->email());
383     if (broker) {
384       external_loader = broker->extension_loader();
385       crx_location = Manifest::EXTERNAL_POLICY;
386     } else {
387       NOTREACHED();
388     }
389   } else {
390     external_loader = new ExternalPolicyLoader(
391         ExtensionManagementFactory::GetForBrowserContext(profile),
392         ExternalPolicyLoader::FORCED);
393     external_recommended_loader = new ExternalPolicyLoader(
394         ExtensionManagementFactory::GetForBrowserContext(profile),
395         ExternalPolicyLoader::RECOMMENDED);
396   }
397 #else
398   external_loader = new ExternalPolicyLoader(
399       ExtensionManagementFactory::GetForBrowserContext(profile),
400       ExternalPolicyLoader::FORCED);
401   external_recommended_loader = new ExternalPolicyLoader(
402       ExtensionManagementFactory::GetForBrowserContext(profile),
403       ExternalPolicyLoader::RECOMMENDED);
404 #endif
405
406   // Policies are mandatory so they can't be skipped with command line flag.
407   if (external_loader.get()) {
408     provider_list->push_back(
409         linked_ptr<ExternalProviderInterface>(
410             new ExternalProviderImpl(
411                 service,
412                 external_loader,
413                 profile,
414                 crx_location,
415                 Manifest::EXTERNAL_POLICY_DOWNLOAD,
416                 Extension::NO_FLAGS)));
417   }
418
419   // Load the KioskAppExternalProvider when running in kiosk mode.
420   if (chrome::IsRunningInForcedAppMode()) {
421 #if defined(OS_CHROMEOS)
422     chromeos::KioskAppManager* kiosk_app_manager =
423         chromeos::KioskAppManager::Get();
424     DCHECK(kiosk_app_manager);
425     if (kiosk_app_manager && !kiosk_app_manager->external_loader_created()) {
426       provider_list->push_back(linked_ptr<ExternalProviderInterface>(
427           new ExternalProviderImpl(service,
428                                    kiosk_app_manager->CreateExternalLoader(),
429                                    profile,
430                                    Manifest::EXTERNAL_PREF,
431                                    Manifest::INVALID_LOCATION,
432                                    Extension::NO_FLAGS)));
433     }
434 #endif
435     return;
436   }
437
438   // Extensions provided by recommended policies.
439   if (external_recommended_loader.get()) {
440     provider_list->push_back(linked_ptr<ExternalProviderInterface>(
441         new ExternalProviderImpl(service,
442                                  external_recommended_loader,
443                                  profile,
444                                  crx_location,
445                                  Manifest::EXTERNAL_PREF_DOWNLOAD,
446                                  Extension::NO_FLAGS)));
447   }
448
449   // In tests don't install extensions from default external sources.
450   // It would only slowdown tests and make them flaky.
451   if (CommandLine::ForCurrentProcess()->HasSwitch(
452       switches::kDisableDefaultApps))
453     return;
454
455   // On Mac OS, items in /Library/... should be written by the superuser.
456   // Check that all components of the path are writable by root only.
457   ExternalPrefLoader::Options check_admin_permissions_on_mac;
458 #if defined(OS_MACOSX)
459   check_admin_permissions_on_mac =
460     ExternalPrefLoader::ENSURE_PATH_CONTROLLED_BY_ADMIN;
461 #else
462   check_admin_permissions_on_mac = ExternalPrefLoader::NONE;
463 #endif
464
465   bool is_chromeos_demo_session = false;
466   int bundled_extension_creation_flags = Extension::NO_FLAGS;
467 #if defined(OS_CHROMEOS)
468   user_manager::UserManager* user_manager = user_manager::UserManager::Get();
469   is_chromeos_demo_session =
470       user_manager && user_manager->IsLoggedInAsDemoUser() &&
471       connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK;
472   bundled_extension_creation_flags = Extension::FROM_WEBSTORE |
473       Extension::WAS_INSTALLED_BY_DEFAULT;
474 #endif
475
476 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
477   if (!profile->IsSupervised()) {
478     provider_list->push_back(
479         linked_ptr<ExternalProviderInterface>(
480             new ExternalProviderImpl(
481                 service,
482                 new ExternalPrefLoader(
483                     chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS,
484                     ExternalPrefLoader::NONE,
485                     NULL),
486                 profile,
487                 Manifest::EXTERNAL_PREF,
488                 Manifest::EXTERNAL_PREF_DOWNLOAD,
489                 bundled_extension_creation_flags)));
490   }
491 #endif
492
493 #if defined(OS_CHROMEOS)
494   if (!is_chromeos_demo_session && !is_chrome_os_public_session) {
495     int external_apps_path_id = profile->IsSupervised() ?
496         chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS :
497         chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS;
498     ExternalPrefLoader::Options pref_load_flags = profile->IsNewProfile() ?
499         ExternalPrefLoader::DELAY_LOAD_UNTIL_PRIORITY_SYNC :
500         ExternalPrefLoader::NONE;
501     provider_list->push_back(
502         linked_ptr<ExternalProviderInterface>(new ExternalProviderImpl(
503             service,
504             new ExternalPrefLoader(external_apps_path_id,
505                                    pref_load_flags,
506                                    profile),
507             profile,
508             Manifest::EXTERNAL_PREF,
509             Manifest::EXTERNAL_PREF_DOWNLOAD,
510             bundled_extension_creation_flags)));
511
512     // OEM default apps.
513     int oem_extension_creation_flags =
514         bundled_extension_creation_flags | Extension::WAS_INSTALLED_BY_OEM;
515     chromeos::ServicesCustomizationDocument* customization =
516         chromeos::ServicesCustomizationDocument::GetInstance();
517     provider_list->push_back(linked_ptr<ExternalProviderInterface>(
518         new ExternalProviderImpl(service,
519                                  customization->CreateExternalLoader(profile),
520                                  profile,
521                                  Manifest::EXTERNAL_PREF,
522                                  Manifest::EXTERNAL_PREF_DOWNLOAD,
523                                  oem_extension_creation_flags)));
524   }
525
526   policy::AppPackUpdater* app_pack_updater = connector->GetAppPackUpdater();
527   if (is_chromeos_demo_session && app_pack_updater &&
528       !app_pack_updater->created_external_loader()) {
529     provider_list->push_back(
530         linked_ptr<ExternalProviderInterface>(
531           new ExternalProviderImpl(
532               service,
533               app_pack_updater->CreateExternalLoader(),
534               profile,
535               Manifest::EXTERNAL_PREF,
536               Manifest::INVALID_LOCATION,
537               Extension::NO_FLAGS)));
538   }
539 #endif
540
541   if (!profile->IsSupervised() && !is_chromeos_demo_session) {
542 #if !defined(OS_WIN)
543     provider_list->push_back(
544         linked_ptr<ExternalProviderInterface>(
545             new ExternalProviderImpl(
546                 service,
547                 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS,
548                                        check_admin_permissions_on_mac,
549                                        NULL),
550                 profile,
551                 Manifest::EXTERNAL_PREF,
552                 Manifest::EXTERNAL_PREF_DOWNLOAD,
553                 bundled_extension_creation_flags)));
554 #endif
555
556     // Define a per-user source of external extensions.
557 #if defined(OS_MACOSX)
558     provider_list->push_back(
559         linked_ptr<ExternalProviderInterface>(
560             new ExternalProviderImpl(
561                 service,
562                 new ExternalPrefLoader(chrome::DIR_USER_EXTERNAL_EXTENSIONS,
563                                        ExternalPrefLoader::NONE,
564                                        NULL),
565                 profile,
566                 Manifest::EXTERNAL_PREF,
567                 Manifest::EXTERNAL_PREF_DOWNLOAD,
568                 Extension::NO_FLAGS)));
569 #endif
570
571 #if defined(OS_WIN)
572     provider_list->push_back(
573         linked_ptr<ExternalProviderInterface>(
574             new ExternalProviderImpl(
575                 service,
576                 new ExternalRegistryLoader,
577                 profile,
578                 Manifest::EXTERNAL_REGISTRY,
579                 Manifest::EXTERNAL_PREF_DOWNLOAD,
580                 Extension::NO_FLAGS)));
581 #endif
582
583 #if !defined(OS_CHROMEOS)
584     // The default apps are installed as INTERNAL but use the external
585     // extension installer codeflow.
586     provider_list->push_back(
587         linked_ptr<ExternalProviderInterface>(
588             new default_apps::Provider(
589                 profile,
590                 service,
591                 new ExternalPrefLoader(chrome::DIR_DEFAULT_APPS,
592                                        ExternalPrefLoader::NONE,
593                                        NULL),
594                 Manifest::INTERNAL,
595                 Manifest::INTERNAL,
596                 Extension::FROM_WEBSTORE |
597                     Extension::WAS_INSTALLED_BY_DEFAULT)));
598 #endif
599
600     provider_list->push_back(
601       linked_ptr<ExternalProviderInterface>(
602         new ExternalProviderImpl(
603             service,
604             new ExternalComponentLoader(profile),
605             profile,
606             Manifest::INVALID_LOCATION,
607             Manifest::EXTERNAL_COMPONENT,
608             Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)));
609   }
610 }
611
612 }  // namespace extensions