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

Side by Side Diff: ios/web/webui/web_ui_ios_data_source_impl.mm

Issue 2260023004: [ARC] [Split this CL] Convert ios/web/webui to ARC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-web-net
Patch Set: Created 4 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
« no previous file with comments | « ios/web/webui/url_fetcher_block_adapter.mm ('k') | ios/web/webui/web_ui_ios_impl.mm » ('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 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 "ios/web/webui/web_ui_ios_data_source_impl.h" 5 #include "ios/web/webui/web_ui_ios_data_source_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "ios/web/public/web_client.h" 12 #include "ios/web/public/web_client.h"
13 #include "ui/base/webui/jstemplate_builder.h" 13 #include "ui/base/webui/jstemplate_builder.h"
14 #include "ui/base/webui/web_ui_util.h" 14 #include "ui/base/webui/web_ui_util.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 namespace web { 20 namespace web {
17 21
18 // static 22 // static
19 WebUIIOSDataSource* WebUIIOSDataSource::Create(const std::string& source_name) { 23 WebUIIOSDataSource* WebUIIOSDataSource::Create(const std::string& source_name) {
20 return new WebUIIOSDataSourceImpl(source_name); 24 return new WebUIIOSDataSourceImpl(source_name);
21 } 25 }
22 26
23 // static 27 // static
24 void WebUIIOSDataSource::Add(BrowserState* browser_state, 28 void WebUIIOSDataSource::Add(BrowserState* browser_state,
25 WebUIIOSDataSource* source) { 29 WebUIIOSDataSource* source) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 157
154 void WebUIIOSDataSourceImpl::SendFromResourceBundle( 158 void WebUIIOSDataSourceImpl::SendFromResourceBundle(
155 const URLDataSourceIOS::GotDataCallback& callback, 159 const URLDataSourceIOS::GotDataCallback& callback,
156 int idr) { 160 int idr) {
157 scoped_refptr<base::RefCountedMemory> response( 161 scoped_refptr<base::RefCountedMemory> response(
158 GetWebClient()->GetDataResourceBytes(idr)); 162 GetWebClient()->GetDataResourceBytes(idr));
159 callback.Run(response); 163 callback.Run(response);
160 } 164 }
161 165
162 } // namespace web 166 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/webui/url_fetcher_block_adapter.mm ('k') | ios/web/webui/web_ui_ios_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698