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

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

Issue 302643003: Remove unnecessary copies in CRLSet parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 6 years, 7 months 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 | « no previous file | net/cert/crl_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/crl_set_fetcher.cc
diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc
index 201faf9b9371d13a0cd9d786f84a747540426c44..b401c2745d795d3f4467311d0af7fefd6654e18a 100644
--- a/chrome/browser/net/crl_set_fetcher.cc
+++ b/chrome/browser/net/crl_set_fetcher.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/net/crl_set_fetcher.h"
#include "base/bind.h"
+#include "base/debug/trace_event.h"
#include "base/file_util.h"
#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
@@ -73,11 +74,16 @@ void CRLSetFetcher::DoInitialLoadFromDisk() {
void CRLSetFetcher::LoadFromDisk(base::FilePath path,
scoped_refptr<net::CRLSet>* out_crl_set) {
+ TRACE_EVENT0("CRLSetFetcher", "LoadFromDisk");
+
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::string crl_set_bytes;
- if (!base::ReadFileToString(path, &crl_set_bytes))
- return;
+ {
+ TRACE_EVENT0("CRLSetFetcher", "ReadFileToString");
+ if (!base::ReadFileToString(path, &crl_set_bytes))
+ return;
+ }
if (!net::CRLSet::Parse(crl_set_bytes, out_crl_set)) {
LOG(WARNING) << "Failed to parse CRL set from " << path.MaybeAsASCII();
« no previous file with comments | « no previous file | net/cert/crl_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698