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

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 1130373002: Returning Corresponding Error Message when their is error in OpenTab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 706f41e009130deadd8baeca5763a635f234adb9..f1783f72ecba294145bea60075ecb628e8dd1d18 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -143,7 +143,8 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
browser->host_desktop_type());
if (!browser || !browser->window()) {
- // TODO(rpaquay): Error message?
+ if (error)
+ *error = keys::kNoCurrentWindowError;
return NULL;
}
@@ -160,7 +161,10 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
NULL,
&opener,
NULL)) {
- // TODO(rpaquay): Error message?
+ if (error) {
+ *error = ErrorUtils::FormatErrorMessage(keys::kTabNotFoundError,
+ base::IntToString(opener_id));
+ }
return NULL;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698