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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } else if (host == chrome::kChromeUIHelpHost) { | 69 } else if (host == chrome::kChromeUIHelpHost) { |
70 host = chrome::kChromeUIUberHost; | 70 host = chrome::kChromeUIUberHost; |
71 path = chrome::kChromeUIHelpHost + url->path(); | 71 path = chrome::kChromeUIHelpHost + url->path(); |
72 } else if (host == chrome::kChromeUIRestartHost) { | 72 } else if (host == chrome::kChromeUIRestartHost) { |
73 // Call AttemptRestart after chrome::Navigate() completes to avoid access of | 73 // Call AttemptRestart after chrome::Navigate() completes to avoid access of |
74 // gtk objects after they are destoyed by BrowserWindowGtk::Close(). | 74 // gtk objects after they are destoyed by BrowserWindowGtk::Close(). |
75 base::MessageLoop::current()->PostTask(FROM_HERE, | 75 base::MessageLoop::current()->PostTask(FROM_HERE, |
76 base::Bind(&chrome::AttemptRestart)); | 76 base::Bind(&chrome::AttemptRestart)); |
77 } else if (host == chrome::kChromeUIDevicesHost) { | 77 } else if (host == chrome::kChromeUIDevicesHost) { |
78 #if defined(ENABLE_MDNS) | 78 #if defined(ENABLE_MDNS) |
79 if (CommandLine::ForCurrentProcess()->HasSwitch( | 79 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
80 switches::kEnableDeviceDiscovery)) { | 80 switches::kDisableDeviceDiscovery)) { |
81 host = chrome::kChromeUIUberHost; | 81 host = chrome::kChromeUIUberHost; |
82 path = chrome::kChromeUIDevicesHost + url->path(); | 82 path = chrome::kChromeUIDevicesHost + url->path(); |
83 } | 83 } |
84 #endif | 84 #endif |
85 } | 85 } |
86 | 86 |
87 GURL::Replacements replacements; | 87 GURL::Replacements replacements; |
88 replacements.SetHostStr(host); | 88 replacements.SetHostStr(host); |
89 if (!path.empty()) | 89 if (!path.empty()) |
90 replacements.SetPathStr(path); | 90 replacements.SetPathStr(path); |
(...skipping 12 matching lines...) Expand all Loading... |
103 // Run the dialog. This will re-use the existing one if it's already up. | 103 // Run the dialog. This will re-use the existing one if it's already up. |
104 chrome::ShowAboutIPCDialog(); | 104 chrome::ShowAboutIPCDialog(); |
105 return true; | 105 return true; |
106 } | 106 } |
107 #endif | 107 #endif |
108 | 108 |
109 #endif // OFFICIAL_BUILD | 109 #endif // OFFICIAL_BUILD |
110 | 110 |
111 return false; | 111 return false; |
112 } | 112 } |
OLD | NEW |