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

Unified Diff: chrome/browser/ui/app_list/search/common/json_response_fetcher.cc

Issue 1140053003: Refactoring: Moving the SafeJsonParser to its own component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving to namespace Created 5 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
Index: chrome/browser/ui/app_list/search/common/json_response_fetcher.cc
diff --git a/chrome/browser/ui/app_list/search/common/json_response_fetcher.cc b/chrome/browser/ui/app_list/search/common/json_response_fetcher.cc
index d4a9c3afbe1bbec123f7d64548acae35a50bebf4..cfda62b4bb39d4732a2fc9a5005304ef8d98eeae 100644
--- a/chrome/browser/ui/app_list/search/common/json_response_fetcher.cc
+++ b/chrome/browser/ui/app_list/search/common/json_response_fetcher.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/values.h"
-#include "chrome/browser/safe_json_parser.h"
+#include "components/safe_json_parser/safe_json_parser.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_status.h"
@@ -72,14 +72,12 @@ void JSONResponseFetcher::OnURLFetchComplete(
std::string json_data;
fetcher->GetResponseAsString(&json_data);
- scoped_refptr<SafeJsonParser> parser =
- new SafeJsonParser(json_data,
- base::Bind(
- &JSONResponseFetcher::OnJsonParseSuccess,
- weak_factory_.GetWeakPtr()),
- base::Bind(
- &JSONResponseFetcher::OnJsonParseError,
- weak_factory_.GetWeakPtr()));
+ scoped_refptr<safe_json_parser::SafeJsonParser> parser =
+ new safe_json_parser::SafeJsonParser(
+ json_data, base::Bind(&JSONResponseFetcher::OnJsonParseSuccess,
+ weak_factory_.GetWeakPtr()),
+ base::Bind(&JSONResponseFetcher::OnJsonParseError,
+ weak_factory_.GetWeakPtr()));
// The parser will call us back via one of the callbacks.
parser->Start();
}

Powered by Google App Engine
This is Rietveld 408576698