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

Unified Diff: chrome/test/chromedriver/status.cc

Issue 11415205: [chromedriver] Implement connecting to devtools and loading a page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
Index: chrome/test/chromedriver/status.cc
diff --git a/chrome/test/chromedriver/status.cc b/chrome/test/chromedriver/status.cc
index bd5027952730113170b963a3c136c717b6770c5a..6dad0789b99c104a63ccabcef0502452748f0dfb 100644
--- a/chrome/test/chromedriver/status.cc
+++ b/chrome/test/chromedriver/status.cc
@@ -4,6 +4,10 @@
#include "chrome/test/chromedriver/status.h"
+#include <vector>
+
+#include "base/string_split.h"
chrisgao (Use stgao instead) 2012/12/01 08:37:19 It seems unused.
kkania 2013/02/28 21:51:58 Done.
+
namespace {
// Returns the string equivalent of the given |ErrorCode|.
@@ -19,6 +23,8 @@ const char* DefaultMessageForStatusCode(StatusCode code) {
return "session not created exception";
case kNoSuchSession:
return "no such session";
+ case kChromeNotReachable:
+ return "chrome not reachable";
default:
return "<unknown>";
}
@@ -34,6 +40,21 @@ Status::Status(StatusCode code, const std::string& details)
msg_(DefaultMessageForStatusCode(code) + std::string(": ") + details) {
}
+Status::Status(StatusCode code, const Status& cause)
+ : code_(code),
+ msg_(DefaultMessageForStatusCode(code) + std::string("\nfrom ") +
+ cause.message()) {}
+
+Status::Status(StatusCode code,
+ const std::string& details,
+ const Status& cause)
+ : code_(code),
+ msg_(DefaultMessageForStatusCode(code) + std::string(": ") + details +
+ "\nfrom " + cause.message()) {
+}
+
+Status::~Status() {}
+
bool Status::IsOk() const {
return code_ == kOk;
}

Powered by Google App Engine
This is Rietveld 408576698