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

Side by Side Diff: extensions/browser/extension_protocols.cc

Issue 1295523006: Using scoped_ptr for URLRequestJobFactoryImpl::SetProtocolHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing un-modified file Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_protocols.h" 5 #include "extensions/browser/extension_protocols.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 raw_headers.append("\""); 550 raw_headers.append("\"");
551 // Also force revalidation. 551 // Also force revalidation.
552 raw_headers.append(1, '\0'); 552 raw_headers.append(1, '\0');
553 raw_headers.append("cache-control: no-cache"); 553 raw_headers.append("cache-control: no-cache");
554 } 554 }
555 555
556 raw_headers.append(2, '\0'); 556 raw_headers.append(2, '\0');
557 return new net::HttpResponseHeaders(raw_headers); 557 return new net::HttpResponseHeaders(raw_headers);
558 } 558 }
559 559
560 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( 560 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
561 bool is_incognito, 561 CreateExtensionProtocolHandler(bool is_incognito,
562 extensions::InfoMap* extension_info_map) { 562 extensions::InfoMap* extension_info_map) {
563 return new ExtensionProtocolHandler(is_incognito, extension_info_map); 563 return make_scoped_ptr(
564 new ExtensionProtocolHandler(is_incognito, extension_info_map));
564 } 565 }
565 566
566 } // namespace extensions 567 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_protocols.h ('k') | extensions/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698