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

Side by Side Diff: monitor_reconfigure_main.cc

Issue 3433013: monitor_reconfig: Add missing call to CommandLine::Init(). (Closed) Base URL: http://git.chromium.org/git/monitor_reconfig.git
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "monitor_reconfig/monitor_reconfigure_main.h" 5 #include "monitor_reconfig/monitor_reconfigure_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdio> 8 #include <cstdio>
9 #include <cstdlib> 9 #include <cstdlib>
10 10
11 #include "base/command_line.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/string_util.h" 13 #include "base/string_util.h"
13 14
14 using std::map; 15 using std::map;
15 using std::sort; 16 using std::sort;
16 using std::string; 17 using std::string;
17 using std::vector; 18 using std::vector;
18 19
19 namespace monitor_reconfig { 20 namespace monitor_reconfig {
20 21
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool MonitorReconfigureMain::SetScreenResolution( 118 bool MonitorReconfigureMain::SetScreenResolution(
118 const std::string& resolution) { 119 const std::string& resolution) {
119 string command = StringPrintf("xrandr --fb %s", resolution.c_str()); 120 string command = StringPrintf("xrandr --fb %s", resolution.c_str());
120 LOG(INFO) << "Running " << command.c_str(); 121 LOG(INFO) << "Running " << command.c_str();
121 return system(command.c_str()) == 0; 122 return system(command.c_str()) == 0;
122 } 123 }
123 124
124 } // end namespace monitor_reconfig 125 } // end namespace monitor_reconfig
125 126
126 int main(int argc, char** argv) { 127 int main(int argc, char** argv) {
128 CommandLine::Init(argc, argv);
127 logging::InitLogging(NULL, 129 logging::InitLogging(NULL,
128 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 130 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
129 logging::DONT_LOCK_LOG_FILE, 131 logging::DONT_LOCK_LOG_FILE,
130 logging::APPEND_TO_OLD_LOG_FILE); 132 logging::APPEND_TO_OLD_LOG_FILE);
131 Display* display = XOpenDisplay(NULL); 133 Display* display = XOpenDisplay(NULL);
132 CHECK(display) << "Could not open display"; 134 CHECK(display) << "Could not open display";
133 135
134 Window window = RootWindow(display, DefaultScreen(display)); 136 Window window = RootWindow(display, DefaultScreen(display));
135 XRRScreenResources* screen_info = XRRGetScreenResources(display, window); 137 XRRScreenResources* screen_info = XRRGetScreenResources(display, window);
136 monitor_reconfig::MonitorReconfigureMain main_app(display, screen_info); 138 monitor_reconfig::MonitorReconfigureMain main_app(display, screen_info);
137 main_app.Run(); 139 main_app.Run();
138 return 0; 140 return 0;
139 } 141 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698