|
Make JSONParser a pure interface.
This allows stubbing it out in tests, and using platform-specific implementations in the future.
As a side effect, the fact that the default implementation is refcounted is not exposed to clients anymore. Instead, the (newly added) factory method returns a raw pointer, and the object will delete itself after either of the callbacks has been called. In practice, this should not make a difference, as no client currently requires the SafeJsonParser to live longer than that, and in one case it actually simplifies things for the client by breaking a reference cycle.
TBR=benwells@chromium.org,brettw@chromium.org
BUG= 501333
Committed: https://crrev.com/64c5a3888f21acf96082e89764e5ee66cc3531b6
Cr-Commit-Position: refs/heads/master@{#337459}
Total comments: 4
Total comments: 13
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+253 lines, -264 lines) |
Patch |
 |
M |
chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
|
View
|
1
2
3
4
|
1 chunk |
+10 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/webstore_data_fetcher.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/webstore_install_helper.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/webstore_install_helper.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+3 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/safe_json_parser_browsertest.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/supervised_user/supervised_user_site_list.h
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/supervised_user/supervised_user_site_list.cc
|
View
|
1
2
3
4
|
3 chunks |
+6 lines, -27 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
|
View
|
|
3 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/search/common/json_response_fetcher.cc
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/web_resource/chrome_web_resource_service.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_tests_unit.gypi
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/test/BUILD.gn
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/safe_json.gypi
|
View
|
1
2
3
4
5
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/safe_json/BUILD.gn
|
View
|
1
2
3
4
5
|
2 chunks |
+17 lines, -0 lines |
3 comments
|
Download
|
 |
M |
components/safe_json/safe_json_parser.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+21 lines, -38 lines |
0 comments
|
Download
|
 |
M |
components/safe_json/safe_json_parser.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+16 lines, -87 lines |
0 comments
|
Download
|
 |
A + |
components/safe_json/safe_json_parser_impl.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+17 lines, -21 lines |
0 comments
|
Download
|
 |
A + |
components/safe_json/safe_json_parser_impl.cc
|
View
|
1
2
3
4
5
6
|
6 chunks |
+24 lines, -31 lines |
0 comments
|
Download
|
 |
A |
components/safe_json/testing_json_parser.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
 |
A |
components/safe_json/testing_json_parser.cc
|
View
|
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
Total messages: 19 (6 generated)
|