OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } else { | 395 } else { |
396 NOTREACHED(); | 396 NOTREACHED(); |
397 } | 397 } |
398 | 398 |
399 std::string manifest = | 399 std::string manifest = |
400 ResourceBundle::GetSharedInstance().GetRawDataResource( | 400 ResourceBundle::GetSharedInstance().GetRawDataResource( |
401 iter->second).as_string(); | 401 iter->second).as_string(); |
402 extensions_service_->register_component_extension( | 402 extensions_service_->register_component_extension( |
403 ExtensionService::ComponentExtensionInfo(manifest, path)); | 403 ExtensionService::ComponentExtensionInfo(manifest, path)); |
404 } | 404 } |
405 | |
406 #if defined(OS_CHROMEOS) | |
407 // Register access extensions only if accessibility is enabled. | |
408 if (g_browser_process->local_state()-> | |
409 GetBoolean(prefs::kAccessibilityEnabled)) { | |
410 FilePath path = FilePath(extension_misc::kAccessExtensionPath) | |
411 .AppendASCII("access_chromevox"); | |
412 std::string manifest = | |
413 ResourceBundle::GetSharedInstance().GetRawDataResource( | |
414 IDR_CHROMEVOX_MANIFEST).as_string(); | |
415 extensions_service_->register_component_extension( | |
416 ExtensionService::ComponentExtensionInfo(manifest, path)); | |
417 } | |
418 #endif | |
419 } | 405 } |
420 | 406 |
421 void ProfileImpl::InstallDefaultApps() { | 407 void ProfileImpl::InstallDefaultApps() { |
422 ExtensionService* extension_service = GetExtensionService(); | 408 ExtensionService* extension_service = GetExtensionService(); |
423 DefaultApps* default_apps = extension_service->default_apps(); | 409 DefaultApps* default_apps = extension_service->default_apps(); |
424 | 410 |
425 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) | 411 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) |
426 return; | 412 return; |
427 | 413 |
428 const ExtensionIdSet& app_ids = default_apps->default_apps(); | 414 const ExtensionIdSet& app_ids = default_apps->default_apps(); |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 } | 1385 } |
1400 | 1386 |
1401 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1387 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
1402 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1388 CommandLine* cl = CommandLine::ForCurrentProcess(); |
1403 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1389 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
1404 return NULL; | 1390 return NULL; |
1405 if (!prerender_manager_) | 1391 if (!prerender_manager_) |
1406 prerender_manager_ = new PrerenderManager(this); | 1392 prerender_manager_ = new PrerenderManager(this); |
1407 return prerender_manager_; | 1393 return prerender_manager_; |
1408 } | 1394 } |
OLD | NEW |