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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } else { | 399 } else { |
400 NOTREACHED(); | 400 NOTREACHED(); |
401 } | 401 } |
402 | 402 |
403 std::string manifest = | 403 std::string manifest = |
404 ResourceBundle::GetSharedInstance().GetRawDataResource( | 404 ResourceBundle::GetSharedInstance().GetRawDataResource( |
405 iter->second).as_string(); | 405 iter->second).as_string(); |
406 extensions_service_->register_component_extension( | 406 extensions_service_->register_component_extension( |
407 ExtensionService::ComponentExtensionInfo(manifest, path)); | 407 ExtensionService::ComponentExtensionInfo(manifest, path)); |
408 } | 408 } |
| 409 |
| 410 #if defined(OS_CHROMEOS) |
| 411 // Register access extensions only if accessibility is enabled. |
| 412 if (g_browser_process->local_state()-> |
| 413 GetBoolean(prefs::kAccessibilityEnabled)) { |
| 414 FilePath path = FilePath(extension_misc::kAccessExtensionPath) |
| 415 .AppendASCII("access_chromevox"); |
| 416 std::string manifest = |
| 417 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 418 IDR_CHROMEVOX_MANIFEST).as_string(); |
| 419 extensions_service_->register_component_extension( |
| 420 ExtensionService::ComponentExtensionInfo(manifest, path)); |
| 421 } |
| 422 #endif |
409 } | 423 } |
410 | 424 |
411 void ProfileImpl::InstallDefaultApps() { | 425 void ProfileImpl::InstallDefaultApps() { |
412 ExtensionService* extension_service = GetExtensionService(); | 426 ExtensionService* extension_service = GetExtensionService(); |
413 DefaultApps* default_apps = extension_service->default_apps(); | 427 DefaultApps* default_apps = extension_service->default_apps(); |
414 | 428 |
415 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) | 429 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) |
416 return; | 430 return; |
417 | 431 |
418 const ExtensionIdSet& app_ids = default_apps->default_apps(); | 432 const ExtensionIdSet& app_ids = default_apps->default_apps(); |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 } | 1403 } |
1390 | 1404 |
1391 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1405 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
1392 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1406 CommandLine* cl = CommandLine::ForCurrentProcess(); |
1393 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1407 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
1394 return NULL; | 1408 return NULL; |
1395 if (!prerender_manager_) | 1409 if (!prerender_manager_) |
1396 prerender_manager_ = new PrerenderManager(this); | 1410 prerender_manager_ = new PrerenderManager(this); |
1397 return prerender_manager_; | 1411 return prerender_manager_; |
1398 } | 1412 } |
OLD | NEW |