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

Side by Side Diff: content/test/test_content_client.cc

Issue 9623027: Move --user-agent overriding logic from chrome into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: replace SetContentClient() with Initialize() Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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" 7 #include "base/base_paths.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 26 matching lines...) Expand all
37 37
38 bool TestContentClient::HasWebUIScheme(const GURL& url) const { 38 bool TestContentClient::HasWebUIScheme(const GURL& url) const {
39 return false; 39 return false;
40 } 40 }
41 41
42 bool TestContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) { 42 bool TestContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) {
43 // TestContentClient does not need to handle any additional messages. 43 // TestContentClient does not need to handle any additional messages.
44 return false; 44 return false;
45 } 45 }
46 46
47 std::string TestContentClient::GetUserAgent(bool* overriding) const {
48 *overriding = false;
49 return std::string("TestContentClient");
50 }
51
52 string16 TestContentClient::GetLocalizedString(int message_id) const { 47 string16 TestContentClient::GetLocalizedString(int message_id) const {
53 return string16(); 48 return string16();
54 } 49 }
55 50
56 base::StringPiece TestContentClient::GetDataResource(int resource_id) const { 51 base::StringPiece TestContentClient::GetDataResource(int resource_id) const {
57 base::StringPiece resource; 52 base::StringPiece resource;
58 data_pack_.GetStringPiece(resource_id, &resource); 53 data_pack_.GetStringPiece(resource_id, &resource);
59 return resource; 54 return resource;
60 } 55 }
61 56
62 #if defined(OS_WIN) 57 #if defined(OS_WIN)
63 bool TestContentClient::SandboxPlugin(CommandLine* command_line, 58 bool TestContentClient::SandboxPlugin(CommandLine* command_line,
64 sandbox::TargetPolicy* policy) { 59 sandbox::TargetPolicy* policy) {
65 return false; 60 return false;
66 } 61 }
67 #endif 62 #endif
68 63
69 #if defined(OS_MACOSX) 64 #if defined(OS_MACOSX)
70 bool TestContentClient::GetSandboxProfileForSandboxType( 65 bool TestContentClient::GetSandboxProfileForSandboxType(
71 int sandbox_type, 66 int sandbox_type,
72 int* sandbox_profile_resource_id) const { 67 int* sandbox_profile_resource_id) const {
73 return false; 68 return false;
74 } 69 }
75 #endif 70 #endif
OLDNEW
« content/browser/site_instance_impl_unittest.cc ('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