Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 23567023: Enable Device Discovery by default on Linux, ChromeOS and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/local_discovery/privet_notifications_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698