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

Side by Side Diff: content/browser/power_save_blocker_linux.cc

Issue 10784026: Merge 146819 - A small defect was introduced with the refactoring of this file. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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) 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/browser/power_save_blocker.h" 5 #include "content/browser/power_save_blocker.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/dpms.h> 8 #include <X11/extensions/dpms.h>
9 // Xlib #defines Status, but we can't have that for some of our headers. 9 // Xlib #defines Status, but we can't have that for some of our headers.
10 #ifdef Status 10 #ifdef Status
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 kGnomeAPIServiceName, 270 kGnomeAPIServiceName,
271 dbus::ObjectPath(kGnomeAPIObjectPath)); 271 dbus::ObjectPath(kGnomeAPIObjectPath));
272 method_call.reset( 272 method_call.reset(
273 new dbus::MethodCall(kGnomeAPIInterfaceName, "Uninhibit")); 273 new dbus::MethodCall(kGnomeAPIInterfaceName, "Uninhibit"));
274 break; 274 break;
275 case FREEDESKTOP_API: 275 case FREEDESKTOP_API:
276 object_proxy = bus_->GetObjectProxy( 276 object_proxy = bus_->GetObjectProxy(
277 kFreeDesktopAPIServiceName, 277 kFreeDesktopAPIServiceName,
278 dbus::ObjectPath(kFreeDesktopAPIObjectPath)); 278 dbus::ObjectPath(kFreeDesktopAPIObjectPath));
279 method_call.reset( 279 method_call.reset(
280 new dbus::MethodCall(kFreeDesktopAPIInterfaceName, "Uninhibit")); 280 new dbus::MethodCall(kFreeDesktopAPIInterfaceName, "UnInhibit"));
281 break; 281 break;
282 } 282 }
283 283
284 dbus::MessageWriter message_writer(method_call.get()); 284 dbus::MessageWriter message_writer(method_call.get());
285 message_writer.AppendUint32(inhibit_cookie_); 285 message_writer.AppendUint32(inhibit_cookie_);
286 scoped_ptr<dbus::Response> response(object_proxy->CallMethodAndBlock( 286 scoped_ptr<dbus::Response> response(object_proxy->CallMethodAndBlock(
287 method_call.get(), dbus::ObjectProxy::TIMEOUT_USE_DEFAULT)); 287 method_call.get(), dbus::ObjectProxy::TIMEOUT_USE_DEFAULT));
288 if (!response.get()) 288 if (!response.get())
289 LOG(ERROR) << "No response to Uninhibit() request!"; 289 LOG(ERROR) << "No response to Uninhibit() request!";
290 // We don't care about checking the result. We assume it works; we can't 290 // We don't care about checking the result. We assume it works; we can't
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 PowerSaveBlockerType type, const std::string& reason) 332 PowerSaveBlockerType type, const std::string& reason)
333 : delegate_(new Delegate(type, reason)) { 333 : delegate_(new Delegate(type, reason)) {
334 delegate_->Init(); 334 delegate_->Init();
335 } 335 }
336 336
337 PowerSaveBlocker::~PowerSaveBlocker() { 337 PowerSaveBlocker::~PowerSaveBlocker() {
338 delegate_->CleanUp(); 338 delegate_->CleanUp();
339 } 339 }
340 340
341 } // namespace content 341 } // namespace content
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