Chromium Code Reviews| 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 "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.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().AppendASCII(extension_misc::kAccessExtensionPath) | |
|
asargent_no_longer_on_chrome
2011/01/21 21:18:40
nit: this should be:
FilePath path = FilePath(ext
Chaitanya
2011/01/21 21:38:49
Done.
| |
| 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 | |
| 423 | |
| 409 } | 424 } |
| 410 | 425 |
| 411 void ProfileImpl::InstallDefaultApps() { | 426 void ProfileImpl::InstallDefaultApps() { |
| 412 ExtensionService* extension_service = GetExtensionService(); | 427 ExtensionService* extension_service = GetExtensionService(); |
| 413 DefaultApps* default_apps = extension_service->default_apps(); | 428 DefaultApps* default_apps = extension_service->default_apps(); |
| 414 | 429 |
| 415 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) | 430 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) |
| 416 return; | 431 return; |
| 417 | 432 |
| 418 const ExtensionIdSet& app_ids = default_apps->default_apps(); | 433 const ExtensionIdSet& app_ids = default_apps->default_apps(); |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1389 } | 1404 } |
| 1390 | 1405 |
| 1391 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1406 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1392 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1407 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 1393 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1408 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
| 1394 return NULL; | 1409 return NULL; |
| 1395 if (!prerender_manager_) | 1410 if (!prerender_manager_) |
| 1396 prerender_manager_ = new PrerenderManager(this); | 1411 prerender_manager_ = new PrerenderManager(this); |
| 1397 return prerender_manager_; | 1412 return prerender_manager_; |
| 1398 } | 1413 } |
| OLD | NEW |