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

Unified Diff: chrome/browser/net/chrome_sdch_policy.cc

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix component linkage Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/chrome_sdch_policy.h ('k') | chrome/browser/resources/net_internals/browser_bridge.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_sdch_policy.cc
diff --git a/chrome/browser/net/chrome_sdch_policy.cc b/chrome/browser/net/chrome_sdch_policy.cc
index 16fdb201893b85a3d7f8d6597bfd9c1c893ffdd8..8ab62b53014131b2cb897163b8e291bfd88197bb 100644
--- a/chrome/browser/net/chrome_sdch_policy.cc
+++ b/chrome/browser/net/chrome_sdch_policy.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "net/base/sdch_manager.h"
+#include "net/base/sdch_net_log_params.h"
ChromeSdchPolicy::ChromeSdchPolicy(net::SdchManager* sdch_manager,
net::URLRequestContext* context)
@@ -24,8 +25,16 @@ ChromeSdchPolicy::~ChromeSdchPolicy() {
}
void ChromeSdchPolicy::OnDictionaryFetched(const std::string& dictionary_text,
- const GURL& dictionary_url) {
- manager_->AddSdchDictionary(dictionary_text, dictionary_url);
+ const GURL& dictionary_url,
+ const net::BoundNetLog& net_log) {
+ net::SdchProblemCode rv =
+ manager_->AddSdchDictionary(dictionary_text, dictionary_url);
+ if (rv != net::SDCH_OK) {
+ net::SdchManager::SdchErrorRecovery(rv);
+ net_log.AddEvent(net::NetLog::TYPE_SDCH_DICTIONARY_ERROR,
+ base::Bind(&net::NetLogSdchDictionaryFetchProblemCallback,
+ rv, dictionary_url, true));
+ }
}
void ChromeSdchPolicy::OnGetDictionary(net::SdchManager* manager,
« no previous file with comments | « chrome/browser/net/chrome_sdch_policy.h ('k') | chrome/browser/resources/net_internals/browser_bridge.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698