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

Side by Side Diff: chrome/test/webdriver/webdriver_dispatch.cc

Issue 7648053: [chromedriver] Add chrome.detach option for configuring Chrome not to quit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile issue Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.cc ('k') | chrome/test/webdriver/webdriver_error.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/webdriver/webdriver_dispatch.h" 5 #include "chrome/test/webdriver/webdriver_dispatch.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 if (method == "POST") { 49 if (method == "POST") {
50 command->ExecutePost(response); 50 command->ExecutePost(response);
51 } else if (method == "GET") { 51 } else if (method == "GET") {
52 command->ExecuteGet(response); 52 command->ExecuteGet(response);
53 } else if (method == "DELETE") { 53 } else if (method == "DELETE") {
54 command->ExecuteDelete(response); 54 command->ExecuteDelete(response);
55 } else { 55 } else {
56 NOTREACHED(); 56 NOTREACHED();
57 } 57 }
58 command->Finish();
58 } 59 }
59 60
60 void Shutdown(struct mg_connection* connection, 61 void Shutdown(struct mg_connection* connection,
61 const struct mg_request_info* request_info, 62 const struct mg_request_info* request_info,
62 void* user_data) { 63 void* user_data) {
63 base::WaitableEvent* shutdown_event = 64 base::WaitableEvent* shutdown_event =
64 reinterpret_cast<base::WaitableEvent*>(user_data); 65 reinterpret_cast<base::WaitableEvent*>(user_data);
65 mg_printf(connection, "HTTP/1.1 200 OK\r\n\r\n"); 66 mg_printf(connection, "HTTP/1.1 200 OK\r\n\r\n");
66 shutdown_event->Signal(); 67 shutdown_event->Signal();
67 } 68 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void Dispatcher::SetNotImplemented(const std::string& pattern) { 332 void Dispatcher::SetNotImplemented(const std::string& pattern) {
332 mg_set_uri_callback(context_, (root_ + pattern).c_str(), 333 mg_set_uri_callback(context_, (root_ + pattern).c_str(),
333 &SendNotImplementedError, NULL); 334 &SendNotImplementedError, NULL);
334 } 335 }
335 336
336 void Dispatcher::ForbidAllOtherRequests() { 337 void Dispatcher::ForbidAllOtherRequests() {
337 mg_set_uri_callback(context_, "*", &SendForbidden, NULL); 338 mg_set_uri_callback(context_, "*", &SendForbidden, NULL);
338 } 339 }
339 340
340 } // namespace webdriver 341 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.cc ('k') | chrome/test/webdriver/webdriver_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698