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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 | 382 |
| 383 // Bookmark manager. | 383 // Bookmark manager. |
| 384 component_extensions.push_back( | 384 component_extensions.push_back( |
| 385 std::make_pair("bookmark_manager", IDR_BOOKMARKS_MANIFEST)); | 385 std::make_pair("bookmark_manager", IDR_BOOKMARKS_MANIFEST)); |
| 386 | 386 |
| 387 #if defined(TOUCH_UI) | 387 #if defined(TOUCH_UI) |
| 388 component_extensions.push_back( | 388 component_extensions.push_back( |
| 389 std::make_pair("keyboard", IDR_KEYBOARD_MANIFEST)); | 389 std::make_pair("keyboard", IDR_KEYBOARD_MANIFEST)); |
| 390 #endif | 390 #endif |
| 391 | 391 |
| 392 #if defined(OS_CHROMEOS) | |
| 393 component_extensions.push_back(std::make_pair( | |
| 394 "/usr/share/chromeos-assets/helpapp", IDR_HELP_MANIFEST)); | |
| 395 #endif | |
| 396 | |
| 392 // Web Store. | 397 // Web Store. |
| 393 component_extensions.push_back( | 398 component_extensions.push_back( |
| 394 std::make_pair("web_store", IDR_WEBSTORE_MANIFEST)); | 399 std::make_pair("web_store", IDR_WEBSTORE_MANIFEST)); |
| 395 | 400 |
| 396 for (ComponentExtensionList::iterator iter = component_extensions.begin(); | 401 for (ComponentExtensionList::iterator iter = component_extensions.begin(); |
| 397 iter != component_extensions.end(); ++iter) { | 402 iter != component_extensions.end(); ++iter) { |
| 398 FilePath path; | 403 FilePath path(iter->first); |
| 399 if (PathService::Get(chrome::DIR_RESOURCES, &path)) { | 404 if (!path.IsAbsolute()) { |
|
Aaron Boodman
2010/12/13 16:29:43
Why this change? It seems if anything, we should C
Dmitry Polukhin
2010/12/13 19:52:38
As you can see from the code all other component e
Aaron Boodman
2010/12/13 20:06:43
Ah.
| |
| 400 path = path.AppendASCII(iter->first); | 405 if (PathService::Get(chrome::DIR_RESOURCES, &path)) { |
| 401 } else { | 406 path = path.AppendASCII(iter->first); |
| 402 NOTREACHED(); | 407 } else { |
| 408 NOTREACHED(); | |
| 409 } | |
| 403 } | 410 } |
| 404 | 411 |
| 405 std::string manifest = | 412 std::string manifest = |
| 406 ResourceBundle::GetSharedInstance().GetRawDataResource( | 413 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 407 iter->second).as_string(); | 414 iter->second).as_string(); |
| 408 extensions_service_->register_component_extension( | 415 extensions_service_->register_component_extension( |
| 409 ExtensionsService::ComponentExtensionInfo(manifest, path)); | 416 ExtensionsService::ComponentExtensionInfo(manifest, path)); |
| 410 } | 417 } |
| 411 } | 418 } |
| 412 | 419 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1355 } | 1362 } |
| 1356 | 1363 |
| 1357 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1364 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1358 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1365 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 1359 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1366 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
| 1360 return NULL; | 1367 return NULL; |
| 1361 if (!prerender_manager_.get()) | 1368 if (!prerender_manager_.get()) |
| 1362 prerender_manager_.reset(new PrerenderManager(this)); | 1369 prerender_manager_.reset(new PrerenderManager(this)); |
| 1363 return prerender_manager_.get(); | 1370 return prerender_manager_.get(); |
| 1364 } | 1371 } |
| OLD | NEW |