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

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

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove is_valid check Created 7 years 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
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/platform_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 69 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
70 base::Bind(&ShowItemInFolderOnFileThread, full_path)); 70 base::Bind(&ShowItemInFolderOnFileThread, full_path));
71 } 71 }
72 72
73 void OpenItem(const base::FilePath& full_path) { 73 void OpenItem(const base::FilePath& full_path) {
74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
75 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 75 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
76 base::Bind(&XDGOpen, full_path.value())); 76 base::Bind(&XDGOpen, full_path.value()));
77 } 77 }
78 78
79 void OpenExternal(const GURL& url) { 79 void OpenExternal(Profile* profile, const GURL& url) {
80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
80 if (url.SchemeIs("mailto")) 81 if (url.SchemeIs("mailto"))
81 XDGEmail(url.spec()); 82 XDGEmail(url.spec());
82 else 83 else
83 XDGOpen(url.spec()); 84 XDGOpen(url.spec());
84 } 85 }
85 86
86 } // namespace platform_util 87 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/platform_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698