| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 399 |
| 400 std::string manifest = | 400 std::string manifest = |
| 401 ResourceBundle::GetSharedInstance().GetRawDataResource( | 401 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 402 iter->second).as_string(); | 402 iter->second).as_string(); |
| 403 extensions_service_->register_component_extension( | 403 extensions_service_->register_component_extension( |
| 404 ExtensionsService::ComponentExtensionInfo(manifest, path)); | 404 ExtensionsService::ComponentExtensionInfo(manifest, path)); |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| 408 void ProfileImpl::InstallDefaultApps() { | 408 void ProfileImpl::InstallDefaultApps() { |
| 409 #if !defined(OS_CHROMEOS) | |
| 410 // On desktop Chrome, we don't have default apps on by, err, default yet. | |
| 411 if (!CommandLine::ForCurrentProcess()->HasSwitch( | |
| 412 switches::kEnableDefaultApps)) { | |
| 413 return; | |
| 414 } | |
| 415 #endif | |
| 416 | |
| 417 // The web store only supports en-US at the moment, so we don't install | 409 // The web store only supports en-US at the moment, so we don't install |
| 418 // default apps in other locales. | 410 // default apps in other locales. |
| 419 if (g_browser_process->GetApplicationLocale() != "en-US") | 411 if (g_browser_process->GetApplicationLocale() != "en-US") |
| 420 return; | 412 return; |
| 421 | 413 |
| 422 ExtensionsService* extensions_service = GetExtensionsService(); | 414 ExtensionsService* extensions_service = GetExtensionsService(); |
| 423 const ExtensionIdSet* app_ids = | 415 const ExtensionIdSet* app_ids = |
| 424 extensions_service->default_apps()->GetAppsToInstall(); | 416 extensions_service->default_apps()->GetAppsToInstall(); |
| 425 if (!app_ids) | 417 if (!app_ids) |
| 426 return; | 418 return; |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 } | 1351 } |
| 1360 | 1352 |
| 1361 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1353 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1362 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1354 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 1363 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1355 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
| 1364 return NULL; | 1356 return NULL; |
| 1365 if (!prerender_manager_.get()) | 1357 if (!prerender_manager_.get()) |
| 1366 prerender_manager_.reset(new PrerenderManager(this)); | 1358 prerender_manager_.reset(new PrerenderManager(this)); |
| 1367 return prerender_manager_.get(); | 1359 return prerender_manager_.get(); |
| 1368 } | 1360 } |
| OLD | NEW |