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

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

Issue 12212047: Linux/ChromeOS Chromium style checker cleanup, chrome/browser/extensions edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 "chrome/browser/extensions/extension_protocols.h" 5 #include "chrome/browser/extensions/extension_protocols.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 mime_type, charset, data, 104 mime_type, charset, data,
105 base::Owned(read_mime_type), 105 base::Owned(read_mime_type),
106 base::Owned(read_result), 106 base::Owned(read_result),
107 callback), 107 callback),
108 true /* task is slow */); 108 true /* task is slow */);
109 DCHECK(posted); 109 DCHECK(posted);
110 110
111 return net::ERR_IO_PENDING; 111 return net::ERR_IO_PENDING;
112 } 112 }
113 113
114 virtual void GetResponseInfo(net::HttpResponseInfo* info) { 114 virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE {
115 *info = response_info_; 115 *info = response_info_;
116 } 116 }
117 117
118 private: 118 private:
119 virtual ~URLRequestResourceBundleJob() { } 119 virtual ~URLRequestResourceBundleJob() { }
120 120
121 void OnMimeTypeRead(std::string* out_mime_type, 121 void OnMimeTypeRead(std::string* out_mime_type,
122 std::string* charset, 122 std::string* charset,
123 std::string* data, 123 std::string* data,
124 std::string* read_mime_type, 124 std::string* read_mime_type,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 *data = "<!DOCTYPE html>\n<body>\n"; 170 *data = "<!DOCTYPE html>\n<body>\n";
171 for (size_t i = 0; i < extension_->background_scripts().size(); ++i) { 171 for (size_t i = 0; i < extension_->background_scripts().size(); ++i) {
172 *data += "<script src=\""; 172 *data += "<script src=\"";
173 *data += extension_->background_scripts()[i]; 173 *data += extension_->background_scripts()[i];
174 *data += "\"></script>\n"; 174 *data += "\"></script>\n";
175 } 175 }
176 176
177 return net::OK; 177 return net::OK;
178 } 178 }
179 179
180 virtual void GetResponseInfo(net::HttpResponseInfo* info) { 180 virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE {
181 *info = response_info_; 181 *info = response_info_;
182 } 182 }
183 183
184 private: 184 private:
185 virtual ~GeneratedBackgroundPageJob() {} 185 virtual ~GeneratedBackgroundPageJob() {}
186 186
187 scoped_refptr<const Extension> extension_; 187 scoped_refptr<const Extension> extension_;
188 net::HttpResponseInfo response_info_; 188 net::HttpResponseInfo response_info_;
189 }; 189 };
190 190
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 send_cors_header); 403 send_cors_header);
404 } 404 }
405 405
406 } // namespace 406 } // namespace
407 407
408 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( 408 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler(
409 bool is_incognito, 409 bool is_incognito,
410 ExtensionInfoMap* extension_info_map) { 410 ExtensionInfoMap* extension_info_map) {
411 return new ExtensionProtocolHandler(is_incognito, extension_info_map); 411 return new ExtensionProtocolHandler(is_incognito, extension_info_map);
412 } 412 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/extensions/extension_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698