| 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 <algorithm> | 10 #include <algorithm> |
| (...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 // When another process is running, use that process instead of starting a | 1665 // When another process is running, use that process instead of starting a |
| 1666 // new one. NotifyOtherProcess will currently give the other process up to | 1666 // new one. NotifyOtherProcess will currently give the other process up to |
| 1667 // 20 seconds to respond. Note that this needs to be done before we attempt | 1667 // 20 seconds to respond. Note that this needs to be done before we attempt |
| 1668 // to read the profile. | 1668 // to read the profile. |
| 1669 notify_result_ = process_singleton_->NotifyOtherProcessOrCreate(); | 1669 notify_result_ = process_singleton_->NotifyOtherProcessOrCreate(); |
| 1670 switch (notify_result_) { | 1670 switch (notify_result_) { |
| 1671 case ProcessSingleton::PROCESS_NONE: | 1671 case ProcessSingleton::PROCESS_NONE: |
| 1672 // No process already running, fall through to starting a new one. | 1672 // No process already running, fall through to starting a new one. |
| 1673 g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing( |
| 1674 *base::CommandLine::ForCurrentProcess()); |
| 1673 break; | 1675 break; |
| 1674 | 1676 |
| 1675 case ProcessSingleton::PROCESS_NOTIFIED: | 1677 case ProcessSingleton::PROCESS_NOTIFIED: |
| 1676 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1678 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1677 // On POSIX systems, print a message notifying the process is running. | 1679 // On POSIX systems, print a message notifying the process is running. |
| 1678 printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide( | 1680 printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide( |
| 1679 l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str()); | 1681 l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str()); |
| 1680 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 1682 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1681 | 1683 |
| 1682 // Having a differentiated return type for testing allows for tests to | 1684 // Having a differentiated return type for testing allows for tests to |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2224 chromeos::CrosSettings::Shutdown(); | 2226 chromeos::CrosSettings::Shutdown(); |
| 2225 #endif // defined(OS_CHROMEOS) | 2227 #endif // defined(OS_CHROMEOS) |
| 2226 #endif // defined(OS_ANDROID) | 2228 #endif // defined(OS_ANDROID) |
| 2227 } | 2229 } |
| 2228 | 2230 |
| 2229 // Public members: | 2231 // Public members: |
| 2230 | 2232 |
| 2231 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2233 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2232 chrome_extra_parts_.push_back(parts); | 2234 chrome_extra_parts_.push_back(parts); |
| 2233 } | 2235 } |
| OLD | NEW |