OLD | NEW |
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } // namespace | 329 } // namespace |
330 | 330 |
331 namespace { | 331 namespace { |
332 | 332 |
333 class ChromeProtocolHandler | 333 class ChromeProtocolHandler |
334 : public net::URLRequestJobFactory::ProtocolHandler { | 334 : public net::URLRequestJobFactory::ProtocolHandler { |
335 public: | 335 public: |
336 // |is_incognito| should be set for incognito profiles. | 336 // |is_incognito| should be set for incognito profiles. |
337 explicit ChromeProtocolHandler(content::ResourceContext* resource_context, | 337 explicit ChromeProtocolHandler(content::ResourceContext* resource_context, |
338 bool is_incognito); | 338 bool is_incognito); |
339 ~ChromeProtocolHandler(); | 339 virtual ~ChromeProtocolHandler(); |
340 | 340 |
341 virtual net::URLRequestJob* MaybeCreateJob( | 341 virtual net::URLRequestJob* MaybeCreateJob( |
342 net::URLRequest* request, | 342 net::URLRequest* request, |
343 net::NetworkDelegate* network_delegate) const OVERRIDE; | 343 net::NetworkDelegate* network_delegate) const OVERRIDE; |
344 | 344 |
345 private: | 345 private: |
346 // These members are owned by ProfileIOData, which owns this ProtocolHandler. | 346 // These members are owned by ProfileIOData, which owns this ProtocolHandler. |
347 content::ResourceContext* const resource_context_; | 347 content::ResourceContext* const resource_context_; |
348 | 348 |
349 // True when generated from an incognito profile. | 349 // True when generated from an incognito profile. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 } // namespace | 563 } // namespace |
564 | 564 |
565 net::URLRequestJobFactory::ProtocolHandler* | 565 net::URLRequestJobFactory::ProtocolHandler* |
566 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 566 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
567 bool is_incognito) { | 567 bool is_incognito) { |
568 return new DevToolsJobFactory(resource_context, is_incognito); | 568 return new DevToolsJobFactory(resource_context, is_incognito); |
569 } | 569 } |
570 | 570 |
571 } // namespace content | 571 } // namespace content |
OLD | NEW |