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

Side by Side Diff: chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc

Issue 1437393002: DO NOT SUBMIT - Test change for demonstration Base URL: https://chromium.googlesource.com/chromium/src.git@gperftools_prof_timer
Patch Set: Created 5 years, 1 month 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
« 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" 5 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 void ThawRenderers(ResultCallback callback) { 83 void ThawRenderers(ResultCallback callback) {
84 DCHECK(file_thread_->RunsTasksOnCurrentThread()); 84 DCHECK(file_thread_->RunsTasksOnCurrentThread());
85 85
86 if (!enabled_) { 86 if (!enabled_) {
87 LOG(ERROR) << "Attempting to thaw renderers when the freezer cgroup is " 87 LOG(ERROR) << "Attempting to thaw renderers when the freezer cgroup is "
88 << "not available."; 88 << "not available.";
89 return; 89 return;
90 } 90 }
91 91
92 LOG(FATAL) << "Crash on Thaw";
93
92 bool result = WriteCommandToFile(kThawCommand, to_be_frozen_state_path_); 94 bool result = WriteCommandToFile(kThawCommand, to_be_frozen_state_path_);
93 ui_thread_->PostTask(FROM_HERE, base::Bind(callback, result)); 95 ui_thread_->PostTask(FROM_HERE, base::Bind(callback, result));
94 } 96 }
95 97
96 void CheckCanFreezeRenderers(ResultCallback callback) { 98 void CheckCanFreezeRenderers(ResultCallback callback) {
97 DCHECK(file_thread_->RunsTasksOnCurrentThread()); 99 DCHECK(file_thread_->RunsTasksOnCurrentThread());
98 100
99 ui_thread_->PostTask(FROM_HERE, base::Bind(callback, enabled_)); 101 ui_thread_->PostTask(FROM_HERE, base::Bind(callback, enabled_));
100 } 102 }
101 103
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 169
168 void FreezerCgroupProcessManager::CheckCanFreezeRenderers( 170 void FreezerCgroupProcessManager::CheckCanFreezeRenderers(
169 ResultCallback callback) { 171 ResultCallback callback) {
170 file_thread_->PostTask(FROM_HERE, 172 file_thread_->PostTask(FROM_HERE,
171 base::Bind(&FileWorker::CheckCanFreezeRenderers, 173 base::Bind(&FileWorker::CheckCanFreezeRenderers,
172 base::Unretained(file_worker_.get()), 174 base::Unretained(file_worker_.get()),
173 callback)); 175 callback));
174 } 176 }
175 177
176 } // namespace chromeos 178 } // namespace chromeos
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