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

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

Issue 10963004: Fix registerProtocolHandler OS registration on Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed blank line Created 8 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/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 new_cmd_line.AppendSwitchASCII(switches::kApp, url.spec()); 90 new_cmd_line.AppendSwitchASCII(switches::kApp, url.spec());
91 } 91 }
92 return new_cmd_line; 92 return new_cmd_line;
93 } 93 }
94 94
95 #if !defined(OS_WIN) 95 #if !defined(OS_WIN)
96 // static 96 // static
97 bool ShellIntegration::SetAsDefaultBrowserInteractive() { 97 bool ShellIntegration::SetAsDefaultBrowserInteractive() {
98 return false; 98 return false;
99 } 99 }
100
101 // static
102 bool ShellIntegration::SetAsDefaultProtocolClientInteractive(
103 const std::string& protocol) {
104 return false;
105 }
100 #endif 106 #endif
101 107
102 bool ShellIntegration::DefaultWebClientObserver::IsOwnedByWorker() { 108 bool ShellIntegration::DefaultWebClientObserver::IsOwnedByWorker() {
103 return false; 109 return false;
104 } 110 }
105 111
106 bool ShellIntegration::DefaultWebClientObserver:: 112 bool ShellIntegration::DefaultWebClientObserver::
107 IsInteractiveSetDefaultPermitted() { 113 IsInteractiveSetDefaultPermitted() {
108 return false; 114 return false;
109 } 115 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 /////////////////////////////////////////////////////////////////////////////// 263 ///////////////////////////////////////////////////////////////////////////////
258 // DefaultProtocolClientWorker, private: 264 // DefaultProtocolClientWorker, private:
259 265
260 ShellIntegration::DefaultWebClientState 266 ShellIntegration::DefaultWebClientState
261 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { 267 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() {
262 return ShellIntegration::IsDefaultProtocolClient(protocol_); 268 return ShellIntegration::IsDefaultProtocolClient(protocol_);
263 } 269 }
264 270
265 bool ShellIntegration::DefaultProtocolClientWorker::SetAsDefault( 271 bool ShellIntegration::DefaultProtocolClientWorker::SetAsDefault(
266 bool interactive_permitted) { 272 bool interactive_permitted) {
267 return ShellIntegration::SetAsDefaultProtocolClient(protocol_); 273 bool result = false;
274 switch (ShellIntegration::CanSetAsDefaultProtocolClient()) {
275 case ShellIntegration::SET_DEFAULT_UNATTENDED:
276 result = ShellIntegration::SetAsDefaultProtocolClient(protocol_);
277 break;
278 case ShellIntegration::SET_DEFAULT_INTERACTIVE:
279 if (interactive_permitted) {
280 result = ShellIntegration::SetAsDefaultProtocolClientInteractive(
281 protocol_);
282 }
283 break;
284 default:
285 NOTREACHED();
286 }
287
288 return result;
268 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698