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