OLD | NEW |
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 Loading... |
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 |
OLD | NEW |