Chromium Code Reviews| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 } else { | 401 } else { |
| 402 NOTREACHED(); | 402 NOTREACHED(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 std::string manifest = | 405 std::string manifest = |
| 406 ResourceBundle::GetSharedInstance().GetRawDataResource( | 406 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 407 iter->second).as_string(); | 407 iter->second).as_string(); |
| 408 extensions_service_->register_component_extension( | 408 extensions_service_->register_component_extension( |
| 409 ExtensionsService::ComponentExtensionInfo(manifest, path)); | 409 ExtensionsService::ComponentExtensionInfo(manifest, path)); |
| 410 } | 410 } |
| 411 | |
| 412 #if defined(OS_CHROMEOS) | |
| 413 std::string manifest = | |
| 414 ResourceBundle::GetSharedInstance().GetRawDataResource( | |
| 415 IDR_HELP_MANIFEST).as_string(); | |
| 416 FilePath path("/usr/share/chromeos-assets/helpapp"); | |
|
Aaron Boodman
2010/12/10 18:38:22
Can you generalize the std::pair<> above into a st
Dmitry Polukhin
2010/12/13 16:17:33
I did it a bit different but kept registration onl
| |
| 417 extensions_service_->register_component_extension( | |
| 418 ExtensionsService::ComponentExtensionInfo(manifest, path)); | |
| 419 #endif | |
| 411 } | 420 } |
| 412 | 421 |
| 413 void ProfileImpl::InstallDefaultApps() { | 422 void ProfileImpl::InstallDefaultApps() { |
| 414 #if !defined(OS_CHROMEOS) | 423 #if !defined(OS_CHROMEOS) |
| 415 // On desktop Chrome, we don't have default apps on by, err, default yet. | 424 // On desktop Chrome, we don't have default apps on by, err, default yet. |
| 416 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 425 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 417 switches::kEnableDefaultApps)) { | 426 switches::kEnableDefaultApps)) { |
| 418 return; | 427 return; |
| 419 } | 428 } |
| 420 #endif | 429 #endif |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1355 } | 1364 } |
| 1356 | 1365 |
| 1357 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1366 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1358 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1367 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 1359 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1368 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
| 1360 return NULL; | 1369 return NULL; |
| 1361 if (!prerender_manager_.get()) | 1370 if (!prerender_manager_.get()) |
| 1362 prerender_manager_.reset(new PrerenderManager(this)); | 1371 prerender_manager_.reset(new PrerenderManager(this)); |
| 1363 return prerender_manager_.get(); | 1372 return prerender_manager_.get(); |
| 1364 } | 1373 } |
| OLD | NEW |