summaryrefslogtreecommitdiffstats
path: root/components/html_viewer
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-08-06 21:50:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-07 04:51:21 +0000
commit0001770c500d61c7369860cfef9353576dd30a3b (patch)
treee282956296ed9a9e26ccf353c3b88cb3ff01871e /components/html_viewer
parentcf282f824bbcc867bbd22415f751490bfc55a848 (diff)
downloadchromium_src-0001770c500d61c7369860cfef9353576dd30a3b.zip
chromium_src-0001770c500d61c7369860cfef9353576dd30a3b.tar.gz
chromium_src-0001770c500d61c7369860cfef9353576dd30a3b.tar.bz2
Revert of Sandbox html_viewer on Linux. (patchset #6 id:100001 of https://codereview.chromium.org/1274743004/ )
Reason for revert: Doesn't build on the Linux GN bot: http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/30188/steps/compile/logs/stdio Original issue's description: > Sandbox html_viewer on Linux. > > This creates a font_service which does the same role as > font_config_ipc_linux.cc does in content/. This lets us sandbox the > html_viewer, while still being able to communicate with fontconfig. > > Also prewarms the ICU timezone data, along with doing all the > prewarming that's done in the core_services sandbox. > > BUG=492524 > NOPRESUBMIT=true > > Committed: https://crrev.com/4196dfefc131b0a77a3e02e917b852dba8faf445 > Cr-Commit-Position: refs/heads/master@{#342281} TBR=jam@chromium.org,erg@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=492524 Review URL: https://codereview.chromium.org/1276163002 Cr-Commit-Position: refs/heads/master@{#342286}
Diffstat (limited to 'components/html_viewer')
-rw-r--r--components/html_viewer/BUILD.gn8
-rw-r--r--components/html_viewer/DEPS1
-rw-r--r--components/html_viewer/global_state.cc8
-rw-r--r--components/html_viewer/html_viewer_main.cc26
4 files changed, 0 insertions, 43 deletions
diff --git a/components/html_viewer/BUILD.gn b/components/html_viewer/BUILD.gn
index ab49118..dcbdaf2 100644
--- a/components/html_viewer/BUILD.gn
+++ b/components/html_viewer/BUILD.gn
@@ -185,10 +185,6 @@ source_set("lib") {
sources += [ "html_viewer_version.rc" ]
}
- if (is_linux && !is_android) {
- deps += [ "//components/font_service/public/cpp" ]
- }
-
data_deps = [
"//components/clipboard",
"//components/view_manager",
@@ -320,8 +316,4 @@ mojo_native_application("apptests") {
":html_viewer",
"//components/view_manager",
]
-
- if (is_linux && !is_android) {
- data_deps += [ "//components/font_service" ]
- }
}
diff --git a/components/html_viewer/DEPS b/components/html_viewer/DEPS
index 4f2c54e..8355e5b 100644
--- a/components/html_viewer/DEPS
+++ b/components/html_viewer/DEPS
@@ -5,7 +5,6 @@ include_rules = [
"+cc",
"+components/clipboard",
"+components/devtools_service/public",
- "+components/font_service/public",
"+components/gpu",
"+components/message_port",
"+components/mime_util",
diff --git a/components/html_viewer/global_state.cc b/components/html_viewer/global_state.cc
index 870c4e7..ec0f570 100644
--- a/components/html_viewer/global_state.cc
+++ b/components/html_viewer/global_state.cc
@@ -22,10 +22,6 @@
#include "ui/mojo/init/ui_init.h"
#include "v8/include/v8.h"
-#if defined(OS_LINUX) && !defined(OS_ANDROID)
-#include "components/font_service/public/cpp/font_loader.h"
-#endif
-
namespace html_viewer {
namespace {
@@ -97,10 +93,6 @@ void GlobalState::InitIfNecessary(const gfx::Size& screen_size_in_pixels,
return;
}
-#if defined(OS_LINUX) && !defined(OS_ANDROID)
- SkFontConfigInterface::SetGlobal(new font_service::FontLoader(app_));
-#endif
-
ui_init_.reset(
new ui::mojo::UIInit(screen_size_in_pixels, device_pixel_ratio));
base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
diff --git a/components/html_viewer/html_viewer_main.cc b/components/html_viewer/html_viewer_main.cc
index 79349639..9afd58d 100644
--- a/components/html_viewer/html_viewer_main.cc
+++ b/components/html_viewer/html_viewer_main.cc
@@ -6,32 +6,6 @@
#include "mojo/application/public/cpp/application_runner.h"
#include "third_party/mojo/src/mojo/public/c/system/main.h"
-// TODO(erg): Much of this will be the same between mojo applications. Maybe we
-// could centralize this code?
-#if defined(OS_LINUX) && !defined(OS_ANDROID)
-#include "base/rand_util.h"
-#include "base/sys_info.h"
-#include "third_party/icu/source/i18n/unicode/timezone.h"
-
-// TODO(erg): Much of this was coppied from zygote_main_linux.cc
-extern "C" {
-void __attribute__((visibility("default"))) MojoSandboxWarm() {
- base::RandUint64();
- base::SysInfo::AmountOfPhysicalMemory();
- base::SysInfo::MaxSharedMemorySize();
- base::SysInfo::NumberOfProcessors();
-
- // ICU DateFormat class (used in base/time_format.cc) needs to get the
- // Olson timezone ID by accessing the zoneinfo files on disk. After
- // TimeZone::createDefault is called once here, the timezone ID is
- // cached and there's no more need to access the file system.
- scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
-
- // TODO(erg): Perform OpenSSL warmup; it wants access to /dev/urandom.
-}
-}
-#endif // defined(OS_LINUX) && !defined(OS_ANDROID)
-
MojoResult MojoMain(MojoHandle shell_handle) {
mojo::ApplicationRunner runner(new html_viewer::HTMLViewer);
return runner.Run(shell_handle);