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

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

Issue 10915047: Links in platform apps should open in the system default browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: refine the patch. 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
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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
682 682
683 FilePath shortcut_filename = GetExtensionShortcutFilename( 683 FilePath shortcut_filename = GetExtensionShortcutFilename(
684 profile_path, extension_id); 684 profile_path, extension_id);
685 DCHECK(!shortcut_filename.empty()); 685 DCHECK(!shortcut_filename.empty());
686 686
687 DeleteShortcutOnDesktop(shortcut_filename); 687 DeleteShortcutOnDesktop(shortcut_filename);
688 DeleteShortcutInApplicationsMenu(shortcut_filename); 688 DeleteShortcutInApplicationsMenu(shortcut_filename);
689 } 689 }
690 690
691 void LaunchDefaultBrowser(const GURL& url) {
Mihai Parparita -not on Chrome 2012/09/04 21:39:53 This is already implemented (for all platforms) by
692 std::vector<std::string> argv;
693 argv.push_back("xdg-open");
694 argv.push_back(url.spec().c_str());
695
696 int exit_code;
697 LaunchXdgUtility(argv, &exit_code);
698 }
699
691 } // namespace ShellIntegrationLinux 700 } // namespace ShellIntegrationLinux
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698