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

Side by Side Diff: content/browser/devtools/devtools_http_handler_impl.cc

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
OLDNEW
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 "content/browser/devtools/devtools_http_handler_impl.h" 5 #include "content/browser/devtools/devtools_http_handler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 delegate_->EnumerateTargets( 472 delegate_->EnumerateTargets(
473 base::Bind(&DevToolsHttpHandlerImpl::OnTargetListReceived, 473 base::Bind(&DevToolsHttpHandlerImpl::OnTargetListReceived,
474 this, connection_id, host)); 474 this, connection_id, host));
475 return; 475 return;
476 } 476 }
477 477
478 if (command == "new") { 478 if (command == "new") {
479 GURL url(net::UnescapeURLComponent( 479 GURL url(net::UnescapeURLComponent(
480 query, net::UnescapeRule::URL_SPECIAL_CHARS)); 480 query, net::UnescapeRule::URL_SPECIAL_CHARS));
481 if (!url.is_valid()) 481 if (!url.is_valid())
482 url = GURL(kAboutBlankURL); 482 url = GURL(url::kAboutBlankURL);
483 scoped_ptr<DevToolsTarget> target(delegate_->CreateNewTarget(url)); 483 scoped_ptr<DevToolsTarget> target(delegate_->CreateNewTarget(url));
484 if (!target) { 484 if (!target) {
485 SendJson(connection_id, 485 SendJson(connection_id,
486 net::HTTP_INTERNAL_SERVER_ERROR, 486 net::HTTP_INTERNAL_SERVER_ERROR,
487 NULL, 487 NULL,
488 "Could not create new page"); 488 "Could not create new page");
489 return; 489 return;
490 } 490 }
491 std::string host = info.headers["host"]; 491 std::string host = info.headers["host"];
492 scoped_ptr<base::DictionaryValue> dictionary( 492 scoped_ptr<base::DictionaryValue> dictionary(
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 id.c_str(), 784 id.c_str(),
785 host); 785 host);
786 dictionary->SetString( 786 dictionary->SetString(
787 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 787 kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
788 } 788 }
789 789
790 return dictionary; 790 return dictionary;
791 } 791 }
792 792
793 } // namespace content 793 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698