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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } // namespace 428 } // namespace
429 429
430 // static 430 // static
431 ShellIntegration::DefaultWebClientSetPermission 431 ShellIntegration::DefaultWebClientSetPermission
432 ShellIntegration::CanSetAsDefaultBrowser() { 432 ShellIntegration::CanSetAsDefaultBrowser() {
433 return SET_DEFAULT_UNATTENDED; 433 return SET_DEFAULT_UNATTENDED;
434 } 434 }
435 435
436 // static 436 // static
437 bool ShellIntegration::SetAsDefaultBrowser() { 437 bool ShellIntegration::SetAsDefaultBrowser() {
438 return SetDefaultWebClient(""); 438 return SetDefaultWebClient(std::string());
439 } 439 }
440 440
441 // static 441 // static
442 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { 442 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
443 return SetDefaultWebClient(protocol); 443 return SetDefaultWebClient(protocol);
444 } 444 }
445 445
446 // static 446 // static
447 ShellIntegration::DefaultWebClientState ShellIntegration::GetDefaultBrowser() { 447 ShellIntegration::DefaultWebClientState ShellIntegration::GetDefaultBrowser() {
448 return GetIsDefaultWebClient(""); 448 return GetIsDefaultWebClient(std::string());
449 } 449 }
450 450
451 // static 451 // static
452 std::string ShellIntegration::GetApplicationForProtocol(const GURL& url) { 452 std::string ShellIntegration::GetApplicationForProtocol(const GURL& url) {
453 return std::string("xdg-open"); 453 return std::string("xdg-open");
454 } 454 }
455 455
456 // static 456 // static
457 ShellIntegration::DefaultWebClientState 457 ShellIntegration::DefaultWebClientState
458 ShellIntegration::IsDefaultProtocolClient(const std::string& protocol) { 458 ShellIntegration::IsDefaultProtocolClient(const std::string& protocol) {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 839
840 base::FilePath shortcut_filename = GetExtensionShortcutFilename( 840 base::FilePath shortcut_filename = GetExtensionShortcutFilename(
841 profile_path, extension_id); 841 profile_path, extension_id);
842 DCHECK(!shortcut_filename.empty()); 842 DCHECK(!shortcut_filename.empty());
843 843
844 DeleteShortcutOnDesktop(shortcut_filename); 844 DeleteShortcutOnDesktop(shortcut_filename);
845 DeleteShortcutInApplicationsMenu(shortcut_filename); 845 DeleteShortcutInApplicationsMenu(shortcut_filename);
846 } 846 }
847 847
848 } // namespace ShellIntegrationLinux 848 } // namespace ShellIntegrationLinux
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/shell_integration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698