OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 #endif // BUILDFLAG(ENABLE_BACKGROUND) | 1655 #endif // BUILDFLAG(ENABLE_BACKGROUND) |
1656 // Post-profile init --------------------------------------------------------- | 1656 // Post-profile init --------------------------------------------------------- |
1657 | 1657 |
1658 TranslateService::Initialize(); | 1658 TranslateService::Initialize(); |
1659 | 1659 |
1660 // Needs to be done before PostProfileInit, since login manager on CrOS is | 1660 // Needs to be done before PostProfileInit, since login manager on CrOS is |
1661 // called inside PostProfileInit. | 1661 // called inside PostProfileInit. |
1662 content::WebUIControllerFactory::RegisterFactory( | 1662 content::WebUIControllerFactory::RegisterFactory( |
1663 ChromeWebUIControllerFactory::GetInstance()); | 1663 ChromeWebUIControllerFactory::GetInstance()); |
1664 | 1664 |
| 1665 #if !defined(DISABLE_NACL) |
1665 // NaClBrowserDelegateImpl is accessed inside PostProfileInit(). | 1666 // NaClBrowserDelegateImpl is accessed inside PostProfileInit(). |
1666 // So make sure to create it before that. | 1667 // So make sure to create it before that. |
1667 #if !defined(DISABLE_NACL) | 1668 nacl::NaClBrowser::SetDelegate(base::MakeUnique<NaClBrowserDelegateImpl>( |
1668 NaClBrowserDelegateImpl* delegate = | 1669 browser_process_->profile_manager())); |
1669 new NaClBrowserDelegateImpl(browser_process_->profile_manager()); | |
1670 nacl::NaClBrowser::SetDelegate(delegate); | |
1671 #endif // !defined(DISABLE_NACL) | 1670 #endif // !defined(DISABLE_NACL) |
1672 | 1671 |
1673 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts. | 1672 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts. |
1674 // (requires supporting early exit). | 1673 // (requires supporting early exit). |
1675 PostProfileInit(); | 1674 PostProfileInit(); |
1676 | 1675 |
1677 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 1676 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
1678 // Show the First Run UI if this is the first time Chrome has been run on | 1677 // Show the First Run UI if this is the first time Chrome has been run on |
1679 // this computer, or we're being compelled to do so by a command line flag. | 1678 // this computer, or we're being compelled to do so by a command line flag. |
1680 // Note that this be done _after_ the PrefService is initialized and all | 1679 // Note that this be done _after_ the PrefService is initialized and all |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 chromeos::CrosSettings::Shutdown(); | 2112 chromeos::CrosSettings::Shutdown(); |
2114 #endif // defined(OS_CHROMEOS) | 2113 #endif // defined(OS_CHROMEOS) |
2115 #endif // defined(OS_ANDROID) | 2114 #endif // defined(OS_ANDROID) |
2116 } | 2115 } |
2117 | 2116 |
2118 // Public members: | 2117 // Public members: |
2119 | 2118 |
2120 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2119 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2121 chrome_extra_parts_.push_back(parts); | 2120 chrome_extra_parts_.push_back(parts); |
2122 } | 2121 } |
OLD | NEW |