| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/net/network_errors_listing_ui.h" | 5 #include "content/browser/net/network_errors_listing_ui.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/memory/ref_counted_memory.h" |
| 12 #include "base/values.h" | 13 #include "base/values.h" |
| 13 #include "content/grit/content_resources.h" | 14 #include "content/grit/content_resources.h" |
| 14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
| 16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 17 #include "net/log/net_log_util.h" | 18 #include "net/log/net_log_util.h" |
| 18 | 19 |
| 19 static const char kDataFile[] = "network-error-data.json"; | 20 static const char kDataFile[] = "network-error-data.json"; |
| 20 static const char kErrorCodeField[] = "errorCode"; | 21 static const char kErrorCodeField[] = "errorCode"; |
| 21 static const char kErrorCodesDataName[] = "errorCodes"; | 22 static const char kErrorCodesDataName[] = "errorCodes"; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 html_source->SetRequestFilter( | 89 html_source->SetRequestFilter( |
| 89 base::Bind(&HandleRequestCallback, | 90 base::Bind(&HandleRequestCallback, |
| 90 web_ui->GetWebContents()->GetBrowserContext())); | 91 web_ui->GetWebContents()->GetBrowserContext())); |
| 91 | 92 |
| 92 BrowserContext* browser_context = | 93 BrowserContext* browser_context = |
| 93 web_ui->GetWebContents()->GetBrowserContext(); | 94 web_ui->GetWebContents()->GetBrowserContext(); |
| 94 WebUIDataSource::Add(browser_context, html_source); | 95 WebUIDataSource::Add(browser_context, html_source); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace content | 98 } // namespace content |
| OLD | NEW |