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

Side by Side Diff: content/browser/webui/url_data_manager_backend.cc

Issue 252323006: Renamed namespaces in src/content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 04/29/2014 19:25:43.09 Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/site_instance_impl_unittest.cc ('k') | content/common/url_schemes.cc » ('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) 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/webui/url_data_manager_backend.h" 5 #include "content/browser/webui/url_data_manager_backend.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return false; 76 return false;
77 } 77 }
78 78
79 return true; 79 return true;
80 } 80 }
81 81
82 // Parse |url| to get the path which will be used to resolve the request. The 82 // Parse |url| to get the path which will be used to resolve the request. The
83 // path is the remaining portion after the scheme and hostname. 83 // path is the remaining portion after the scheme and hostname.
84 void URLToRequestPath(const GURL& url, std::string* path) { 84 void URLToRequestPath(const GURL& url, std::string* path) {
85 const std::string& spec = url.possibly_invalid_spec(); 85 const std::string& spec = url.possibly_invalid_spec();
86 const url_parse::Parsed& parsed = url.parsed_for_possibly_invalid_spec(); 86 const url::Parsed& parsed = url.parsed_for_possibly_invalid_spec();
87 // + 1 to skip the slash at the beginning of the path. 87 // + 1 to skip the slash at the beginning of the path.
88 int offset = parsed.CountCharactersBefore(url_parse::Parsed::PATH, false) + 1; 88 int offset = parsed.CountCharactersBefore(url::Parsed::PATH, false) + 1;
89 89
90 if (offset < static_cast<int>(spec.size())) 90 if (offset < static_cast<int>(spec.size()))
91 path->assign(spec.substr(offset)); 91 path->assign(spec.substr(offset));
92 } 92 }
93 93
94 } // namespace 94 } // namespace
95 95
96 // URLRequestChromeJob is a net::URLRequestJob that manages running 96 // URLRequestChromeJob is a net::URLRequestJob that manages running
97 // chrome-internal resource requests asynchronously. 97 // chrome-internal resource requests asynchronously.
98 // It hands off URL requests to ChromeURLDataManager, which asynchronously 98 // It hands off URL requests to ChromeURLDataManager, which asynchronously
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 } // namespace 727 } // namespace
728 728
729 net::URLRequestJobFactory::ProtocolHandler* 729 net::URLRequestJobFactory::ProtocolHandler*
730 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, 730 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context,
731 bool is_incognito) { 731 bool is_incognito) {
732 return new DevToolsJobFactory(resource_context, is_incognito); 732 return new DevToolsJobFactory(resource_context, is_incognito);
733 } 733 }
734 734
735 } // namespace content 735 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl_unittest.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698