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

Side by Side 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: also remove old bundle gyp code 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_content_client.h" 5 #include "content/test/test_content_client.h"
6 6
7 #include "base/base_paths.h"
8 #include "base/file_path.h"
7 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h"
8 #include "base/string_piece.h" 11 #include "base/string_piece.h"
9 12
10 TestContentClient::TestContentClient() { 13 TestContentClient::TestContentClient() {
14 FilePath content_resources_pack_path;
15 PathService::Get(base::DIR_MODULE, &content_resources_pack_path);
16 content_resources_pack_path = content_resources_pack_path.Append(
17 FILE_PATH_LITERAL("content_resources.pak"));
18 data_pack_.Load(content_resources_pack_path);
11 } 19 }
12 20
13 TestContentClient::~TestContentClient() { 21 TestContentClient::~TestContentClient() {
14 } 22 }
15 23
16 void TestContentClient::SetActiveURL(const GURL& url) { 24 void TestContentClient::SetActiveURL(const GURL& url) {
17 } 25 }
18 26
19 void TestContentClient::SetGpuInfo(const content::GPUInfo& gpu_info) { 27 void TestContentClient::SetGpuInfo(const content::GPUInfo& gpu_info) {
20 } 28 }
(...skipping 17 matching lines...) Expand all
38 std::string TestContentClient::GetUserAgent(bool* overriding) const { 46 std::string TestContentClient::GetUserAgent(bool* overriding) const {
39 *overriding = false; 47 *overriding = false;
40 return std::string("TestContentClient"); 48 return std::string("TestContentClient");
41 } 49 }
42 50
43 string16 TestContentClient::GetLocalizedString(int message_id) const { 51 string16 TestContentClient::GetLocalizedString(int message_id) const {
44 return string16(); 52 return string16();
45 } 53 }
46 54
47 base::StringPiece TestContentClient::GetDataResource(int resource_id) const { 55 base::StringPiece TestContentClient::GetDataResource(int resource_id) const {
48 return base::StringPiece(); 56 base::StringPiece resource;
57 data_pack_.GetStringPiece(resource_id, &resource);
58 return resource;
49 } 59 }
50 60
51 #if defined(OS_WIN) 61 #if defined(OS_WIN)
52 bool TestContentClient::SandboxPlugin(CommandLine* command_line, 62 bool TestContentClient::SandboxPlugin(CommandLine* command_line,
53 sandbox::TargetPolicy* policy) { 63 sandbox::TargetPolicy* policy) {
54 return false; 64 return false;
55 } 65 }
56 #endif 66 #endif
OLDNEW
« content/common/sandbox_mac_unittest_helper.h ('K') | « content/test/test_content_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698