OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #import "ios/web_view/public/criwv_web_view_configuration.h" | 5 #import "ios/web_view/public/criwv_web_view_configuration.h" |
6 | 6 |
7 #import "ios/web_view/public/criwv_website_data_store.h" | 7 #import "ios/web_view/public/cwv_website_data_store.h" |
8 | 8 |
9 #if !defined(__has_feature) || !__has_feature(objc_arc) | 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
10 #error "This file requires ARC support." | 10 #error "This file requires ARC support." |
11 #endif | 11 #endif |
12 | 12 |
13 @interface CRIWVWebViewConfiguration () | 13 @interface CRIWVWebViewConfiguration () |
14 // Initialize configuration with specified data store. | 14 // Initialize configuration with specified data store. |
15 - (instancetype)initWithDataStore:(CRIWVWebsiteDataStore*)dataStore; | 15 - (instancetype)initWithDataStore:(CWVWebsiteDataStore*)dataStore; |
16 @end | 16 @end |
17 | 17 |
18 @implementation CRIWVWebViewConfiguration | 18 @implementation CRIWVWebViewConfiguration |
19 | 19 |
20 @synthesize websiteDataStore = _websiteDataStore; | 20 @synthesize websiteDataStore = _websiteDataStore; |
21 | 21 |
22 - (instancetype)init { | 22 - (instancetype)init { |
23 return [self initWithDataStore:[CRIWVWebsiteDataStore defaultDataStore]]; | 23 return [self initWithDataStore:[CWVWebsiteDataStore defaultDataStore]]; |
24 } | 24 } |
25 | 25 |
26 - (instancetype)initWithDataStore:(CRIWVWebsiteDataStore*)dataStore { | 26 - (instancetype)initWithDataStore:(CWVWebsiteDataStore*)dataStore { |
27 self = [super init]; | 27 self = [super init]; |
28 if (self) { | 28 if (self) { |
29 _websiteDataStore = dataStore; | 29 _websiteDataStore = dataStore; |
30 } | 30 } |
31 return self; | 31 return self; |
32 } | 32 } |
33 | 33 |
34 // NSCopying | 34 // NSCopying |
35 | 35 |
36 - (id)copyWithZone:(NSZone*)zone { | 36 - (id)copyWithZone:(NSZone*)zone { |
37 return | 37 return |
38 [[[self class] allocWithZone:zone] initWithDataStore:_websiteDataStore]; | 38 [[[self class] allocWithZone:zone] initWithDataStore:_websiteDataStore]; |
39 } | 39 } |
40 | 40 |
41 @end | 41 @end |
OLD | NEW |