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

Unified Diff: ui/gfx/ozone/surface_factory_ozone.cc

Issue 44933002: Implement OzonePlatform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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: ui/gfx/ozone/surface_factory_ozone.cc
diff --git a/ui/gfx/ozone/surface_factory_ozone.cc b/ui/gfx/ozone/surface_factory_ozone.cc
index da89771a5013f4de1c929f8c59ecaaf4f0dde42f..d52a51deeceabedbaa169a8c87dd31fc6d0f4c8e 100644
--- a/ui/gfx/ozone/surface_factory_ozone.cc
+++ b/ui/gfx/ozone/surface_factory_ozone.cc
@@ -46,20 +46,7 @@ SurfaceFactoryOzone::~SurfaceFactoryOzone() {
}
SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
- if (!impl_) {
- const char kOzoneFileSurface[] = "ozone-dump-file";
- CommandLine* cmd = CommandLine::ForCurrentProcess();
- if (cmd->HasSwitch(kOzoneFileSurface)) {
- base::FilePath location = cmd->GetSwitchValuePath(kOzoneFileSurface);
- if (location.empty())
- location = base::FilePath("/dev/null");
- impl_ = new FileSurfaceFactoryOzone(location);
- } else {
- LOG(WARNING) << "No SurfaceFactoryOzone implementation set. Using default"
- " gfx::SoftwareSurfaceFactoryOzone.";
- impl_ = new SoftwareSurfaceFactoryOzone();
- }
- }
+ CHECK(impl_) << "No SurfaceFactoryOzone implementation set.";
return impl_;
}

Powered by Google App Engine
This is Rietveld 408576698