Chromium Code Reviews| 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/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 file_manager_util::ShowFileInFolder(full_path); | 48 file_manager_util::ShowFileInFolder(full_path); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void OpenItem(const FilePath& full_path) { | 51 void OpenItem(const FilePath& full_path) { |
| 52 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 52 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 53 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 53 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 54 base::Bind(&OpenItemOnFileThread, full_path)); | 54 base::Bind(&OpenItemOnFileThread, full_path)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void OpenExternal(const GURL& url) { | 57 void OpenExternal(const GURL& url) { |
| 58 // TODO(skuhne): This code seems obsolete since we have default handlers on | |
| 59 // ChromeOS which should handle this. The simple "mailto" request default | |
| 60 // case was handled properly, but it is unclear if there aren't some hidden | |
| 61 // cases left. | |
|
DaveMoore
2012/04/26 14:45:50
I would rather see us remove this or replace the c
Mr4D (OOO till 08-26)
2012/04/26 16:34:37
Okay, I have changed the comment after reviewing t
| |
| 58 if (url.SchemeIs("mailto")) { | 62 if (url.SchemeIs("mailto")) { |
| 59 std::string string_url = kGmailComposeUrl; | 63 std::string string_url = kGmailComposeUrl; |
| 60 string_url.append(url.spec()); | 64 string_url.append(url.spec()); |
| 61 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 65 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 62 base::Bind(OpenURL, string_url)); | 66 base::Bind(OpenURL, string_url)); |
| 63 } | 67 } |
| 64 } | 68 } |
| 65 | 69 |
| 66 } // namespace platform_util | 70 } // namespace platform_util |
| OLD | NEW |