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

Unified Diff: content/test/test_content_client.cc

Issue 8589001: Load mac sandbox definitions from resources instead of the bundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 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 | « content/test/test_content_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_content_client.cc
diff --git a/content/test/test_content_client.cc b/content/test/test_content_client.cc
index e1d6d438ad3686752941d098f2d09fb3c8511d70..eeb1df39be61752c4814035a114cea8b12e43033 100644
--- a/content/test/test_content_client.cc
+++ b/content/test/test_content_client.cc
@@ -4,10 +4,18 @@
#include "content/test/test_content_client.h"
+#include "base/base_paths.h"
+#include "base/file_path.h"
#include "base/logging.h"
+#include "base/path_service.h"
#include "base/string_piece.h"
TestContentClient::TestContentClient() {
+ FilePath content_resources_pack_path;
+ PathService::Get(base::DIR_MODULE, &content_resources_pack_path);
+ content_resources_pack_path = content_resources_pack_path.Append(
+ FILE_PATH_LITERAL("content_resources.pak"));
+ data_pack_.Load(content_resources_pack_path);
}
TestContentClient::~TestContentClient() {
@@ -45,7 +53,9 @@ string16 TestContentClient::GetLocalizedString(int message_id) const {
}
base::StringPiece TestContentClient::GetDataResource(int resource_id) const {
- return base::StringPiece();
+ base::StringPiece resource;
+ data_pack_.GetStringPiece(resource_id, &resource);
+ return resource;
}
#if defined(OS_WIN)
@@ -54,3 +64,11 @@ bool TestContentClient::SandboxPlugin(CommandLine* command_line,
return false;
}
#endif
+
+#if defined(OS_MACOSX)
+bool TestContentClient::GetSandboxProfileForSandboxType(
+ int sandbox_type,
+ int* sandbox_profile_resource_id) const {
+ return false;
+}
+#endif
« no previous file with comments | « content/test/test_content_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698