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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 extensions_enabled)); | 463 extensions_enabled)); |
464 | 464 |
465 RegisterComponentExtensions(); | 465 RegisterComponentExtensions(); |
466 extension_service_->Init(); | 466 extension_service_->Init(); |
467 | 467 |
468 if (extensions_enabled) { | 468 if (extensions_enabled) { |
469 // Load any extensions specified with --load-extension. | 469 // Load any extensions specified with --load-extension. |
470 if (command_line->HasSwitch(switches::kLoadExtension)) { | 470 if (command_line->HasSwitch(switches::kLoadExtension)) { |
471 FilePath path = command_line->GetSwitchValuePath( | 471 FilePath path = command_line->GetSwitchValuePath( |
472 switches::kLoadExtension); | 472 switches::kLoadExtension); |
473 extension_service_->LoadExtension(path); | 473 extension_service_->LoadExtensionFromCommandLine(path); |
474 } | 474 } |
475 } | 475 } |
476 | 476 |
477 // Make the chrome://extension-icon/ resource available. | 477 // Make the chrome://extension-icon/ resource available. |
478 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this)); | 478 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this)); |
479 } | 479 } |
480 | 480 |
481 void ProfileImpl::RegisterComponentExtensions() { | 481 void ProfileImpl::RegisterComponentExtensions() { |
482 // Register the component extensions. | 482 // Register the component extensions. |
483 // | 483 // |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1652 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
1653 return NULL; | 1653 return NULL; |
1654 if (!prerender_manager_.get()) { | 1654 if (!prerender_manager_.get()) { |
1655 CHECK(g_browser_process->prerender_tracker()); | 1655 CHECK(g_browser_process->prerender_tracker()); |
1656 prerender_manager_.reset( | 1656 prerender_manager_.reset( |
1657 new prerender::PrerenderManager( | 1657 new prerender::PrerenderManager( |
1658 this, g_browser_process->prerender_tracker())); | 1658 this, g_browser_process->prerender_tracker())); |
1659 } | 1659 } |
1660 return prerender_manager_.get(); | 1660 return prerender_manager_.get(); |
1661 } | 1661 } |
OLD | NEW |