Remove redundant method

This commit is contained in:
Gabriel Handford 2016-10-14 12:34:02 -07:00 committed by Cheng Zhao
parent 128feb17cb
commit 9ca684d87f
2 changed files with 4 additions and 12 deletions

View file

@ -79,7 +79,7 @@ bool OpenItem(const base::FilePath& full_path) {
return XDGOpen(full_path.value(), true); return XDGOpen(full_path.value(), true);
} }
bool openExternal(const GURL& url, bool activate) { bool OpenExternal(const GURL& url, bool activate) {
// Don't wait for exit, since we don't want to wait for the browser/email // Don't wait for exit, since we don't want to wait for the browser/email
// client window to close before returning // client window to close before returning
if (url.SchemeIs("mailto")) if (url.SchemeIs("mailto"))
@ -88,13 +88,9 @@ bool openExternal(const GURL& url, bool activate) {
return XDGOpen(url.spec(), false); return XDGOpen(url.spec(), false);
} }
bool OpenExternal(const GURL& url, bool activate) {
return openExternal(url, activate);
}
bool OpenExternal(const GURL& url, bool activate, const OpenExternalCallback& callback) { bool OpenExternal(const GURL& url, bool activate, const OpenExternalCallback& callback) {
// TODO: Implement async open if callback is specified // TODO: Implement async open if callback is specified
bool opened = openExternal(url, activate); bool opened = OpenExternal(url, activate);
callback.Run(opened); callback.Run(opened);
return opened; return opened;
} }

View file

@ -299,7 +299,7 @@ bool OpenItem(const base::FilePath& full_path) {
return ui::win::OpenFileViaShell(full_path); return ui::win::OpenFileViaShell(full_path);
} }
bool openExternal(const base::string16& url, bool activate) { bool OpenExternal(const base::string16& url, bool activate) {
// Quote the input scheme to be sure that the command does not have // Quote the input scheme to be sure that the command does not have
// parameters unexpected by the external program. This url should already // parameters unexpected by the external program. This url should already
// have been escaped. // have been escaped.
@ -316,13 +316,9 @@ bool openExternal(const base::string16& url, bool activate) {
return true; return true;
} }
bool OpenExternal(const base::string16& url, bool activate) {
return openExternal(url, activate);
}
bool OpenExternal(const base::string16& url, bool activate, const OpenExternalCallback& callback) { bool OpenExternal(const base::string16& url, bool activate, const OpenExternalCallback& callback) {
// TODO: Implement async open if callback is specified // TODO: Implement async open if callback is specified
bool opened = openExternal(url, activate); bool opened = OpenExternal(url, activate);
callback.Run(opened); callback.Run(opened);
return opened; return opened;
} }