| Index: content/renderer/manifest/manifest_manager.cc
|
| diff --git a/content/renderer/manifest/manifest_manager.cc b/content/renderer/manifest/manifest_manager.cc
|
| index 98e976e2c2c1117d44f8f494bc74dd97338f89cf..b87524941c626b5e69280834a46c2fb0275f000d 100644
|
| --- a/content/renderer/manifest/manifest_manager.cc
|
| +++ b/content/renderer/manifest/manifest_manager.cc
|
| @@ -8,10 +8,10 @@
|
| #include "base/strings/nullable_string16.h"
|
| #include "content/common/manifest_manager_messages.h"
|
| #include "content/public/renderer/document_state.h"
|
| +#include "content/public/renderer/manifest_parser.h"
|
| #include "content/public/renderer/navigation_state.h"
|
| #include "content/public/renderer/render_frame.h"
|
| #include "content/renderer/fetchers/manifest_fetcher.h"
|
| -#include "content/renderer/manifest/manifest_parser.h"
|
| #include "content/renderer/manifest/manifest_uma_util.h"
|
| #include "third_party/WebKit/public/platform/WebURLResponse.h"
|
| #include "third_party/WebKit/public/web/WebConsoleMessage.h"
|
| @@ -141,12 +141,12 @@ void ManifestManager::OnManifestFetchComplete(
|
|
|
| ManifestUmaUtil::FetchSucceeded();
|
|
|
| - ManifestParser parser(data, response.url(), document_url);
|
| - parser.Parse();
|
| + scoped_ptr<ManifestParser> parser = ManifestParser::Get();
|
| + parser->Parse(data, response.url(), document_url);
|
|
|
| fetcher_.reset();
|
|
|
| - for (const std::string& msg : parser.errors()) {
|
| + for (const std::string& msg : parser->errors()) {
|
| blink::WebConsoleMessage message;
|
| message.level = blink::WebConsoleMessage::LevelError;
|
| message.text = blink::WebString::fromUTF8(msg);
|
| @@ -155,12 +155,12 @@ void ManifestManager::OnManifestFetchComplete(
|
|
|
| // Having errors while parsing the manifest doesn't mean the manifest parsing
|
| // failed. Some properties might have been ignored but some others kept.
|
| - if (parser.failed()) {
|
| + if (parser->failed()) {
|
| ResolveCallbacks(ResolveStateFailure);
|
| return;
|
| }
|
|
|
| - manifest_ = parser.manifest();
|
| + manifest_ = parser->manifest();
|
| ResolveCallbacks(ResolveStateSuccess);
|
| }
|
|
|
|
|