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

Unified Diff: chrome/browser/extensions/updater/safe_manifest_parser.h

Issue 464613002: Move SafeManifestParser to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and update gn Created 6 years, 3 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/extensions/updater/safe_manifest_parser.h
diff --git a/chrome/browser/extensions/updater/safe_manifest_parser.h b/chrome/browser/extensions/updater/safe_manifest_parser.h
deleted file mode 100644
index 3c831640bec9d6dfd81ad525664296e00fc25543..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/updater/safe_manifest_parser.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_SAFE_MANIFEST_PARSER_H_
-#define CHROME_BROWSER_EXTENSIONS_UPDATER_SAFE_MANIFEST_PARSER_H_
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/public/browser/utility_process_host_client.h"
-#include "extensions/browser/updater/manifest_fetch_data.h"
-#include "extensions/common/update_manifest.h"
-
-namespace extensions {
-
-// Utility class to handle doing xml parsing in a sandboxed utility process.
-class SafeManifestParser : public content::UtilityProcessHostClient {
- public:
- // Callback that is invoked when the manifest results are ready.
- typedef base::Callback<void(const ManifestFetchData&,
- const UpdateManifest::Results*)> UpdateCallback;
-
- // Takes ownership of |fetch_data|.
- SafeManifestParser(const std::string& xml,
- ManifestFetchData* fetch_data,
- const UpdateCallback& update_callback);
-
- // Posts a task over to the IO loop to start the parsing of xml_ in a
- // utility process.
- void Start();
-
- private:
- virtual ~SafeManifestParser();
-
- // Creates the sandboxed utility process and tells it to start parsing.
- void ParseInSandbox();
-
- // content::UtilityProcessHostClient implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- void OnParseUpdateManifestSucceeded(const UpdateManifest::Results& results);
- void OnParseUpdateManifestFailed(const std::string& error_message);
-
- const std::string xml_;
-
- // Should be accessed only on UI thread.
- scoped_ptr<ManifestFetchData> fetch_data_;
- UpdateCallback update_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(SafeManifestParser);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_UPDATER_SAFE_MANIFEST_PARSER_H_
« no previous file with comments | « chrome/browser/extensions/updater/extension_downloader.cc ('k') | chrome/browser/extensions/updater/safe_manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698