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

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

Issue 10453041: Support for interactive set-chrome-as-default in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A minor style-oops. Created 8 years, 6 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_linux.h" 5 #include "chrome/browser/shell_integration_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <glib.h> 8 #include <glib.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 // Allow any reply that starts with "yes". 351 // Allow any reply that starts with "yes".
352 return (reply.find("yes") == 0) ? ShellIntegration::IS_DEFAULT_WEB_CLIENT : 352 return (reply.find("yes") == 0) ? ShellIntegration::IS_DEFAULT_WEB_CLIENT :
353 ShellIntegration::NOT_DEFAULT_WEB_CLIENT; 353 ShellIntegration::NOT_DEFAULT_WEB_CLIENT;
354 #endif 354 #endif
355 } 355 }
356 356
357 } // namespace 357 } // namespace
358 358
359 // static 359 // static
360 bool ShellIntegration::CanSetAsDefaultBrowser() { 360 ShellIntegration::DefaultSettingsChangePermission
361 return true; 361 ShellIntegration::CanSetAsDefaultBrowser() {
362 return CHANGE_DEFAULT_UNATTENDED;
362 } 363 }
363 364
364 // static 365 // static
365 bool ShellIntegration::SetAsDefaultBrowser() { 366 bool ShellIntegration::SetAsDefaultBrowser() {
366 return SetDefaultWebClient(""); 367 return SetDefaultWebClient("");
367 } 368 }
368 369
369 // static 370 // static
370 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { 371 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
371 return SetDefaultWebClient(protocol); 372 return SetDefaultWebClient(protocol);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 success = CreateShortcutOnDesktop(shortcut_filename, contents); 621 success = CreateShortcutOnDesktop(shortcut_filename, contents);
621 622
622 if (shortcut_info.create_in_applications_menu) 623 if (shortcut_info.create_in_applications_menu)
623 success = CreateShortcutInApplicationsMenu(shortcut_filename, contents) && 624 success = CreateShortcutInApplicationsMenu(shortcut_filename, contents) &&
624 success; 625 success;
625 626
626 return success; 627 return success;
627 } 628 }
628 629
629 } // namespace ShellIntegrationLinux 630 } // namespace ShellIntegrationLinux
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698