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

Side by Side Diff: chrome/renderer/chrome_mock_render_thread.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/chrome_mock_render_thread.h" 5 #include "chrome/renderer/chrome_mock_render_thread.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) || 156 !job_settings.GetInteger(printing::kSettingDuplexMode, NULL) ||
157 !job_settings.GetInteger(printing::kSettingCopies, NULL) || 157 !job_settings.GetInteger(printing::kSettingCopies, NULL) ||
158 !job_settings.GetString(printing::kPreviewUIAddr, &dummy_string) || 158 !job_settings.GetString(printing::kPreviewUIAddr, &dummy_string) ||
159 !job_settings.GetInteger(printing::kPreviewRequestID, NULL) || 159 !job_settings.GetInteger(printing::kPreviewRequestID, NULL) ||
160 !job_settings.GetInteger(printing::kSettingMarginsType, &margins_type)) { 160 !job_settings.GetInteger(printing::kSettingMarginsType, &margins_type)) {
161 return; 161 return;
162 } 162 }
163 163
164 // Just return the default settings. 164 // Just return the default settings.
165 if (printer_.get()) { 165 if (printer_.get()) {
166 ListValue* page_range_array; 166 const ListValue* page_range_array;
167 printing::PageRanges new_ranges; 167 printing::PageRanges new_ranges;
168 if (job_settings.GetList(printing::kSettingPageRange, &page_range_array)) { 168 if (job_settings.GetList(printing::kSettingPageRange, &page_range_array)) {
169 for (size_t index = 0; index < page_range_array->GetSize(); ++index) { 169 for (size_t index = 0; index < page_range_array->GetSize(); ++index) {
170 base::DictionaryValue* dict; 170 base::DictionaryValue* dict;
171 if (!page_range_array->GetDictionary(index, &dict)) 171 if (!page_range_array->GetDictionary(index, &dict))
172 continue; 172 continue;
173 printing::PageRange range; 173 printing::PageRange range;
174 if (!dict->GetInteger(printing::kSettingPageRangeFrom, &range.from) || 174 if (!dict->GetInteger(printing::kSettingPageRangeFrom, &range.from) ||
175 !dict->GetInteger(printing::kSettingPageRangeTo, &range.to)) { 175 !dict->GetInteger(printing::kSettingPageRangeTo, &range.to)) {
176 continue; 176 continue;
(...skipping 14 matching lines...) Expand all
191 print_dialog_user_response_ = response; 191 print_dialog_user_response_ = response;
192 } 192 }
193 193
194 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) { 194 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) {
195 print_preview_cancel_page_number_ = page; 195 print_preview_cancel_page_number_ = page;
196 } 196 }
197 197
198 int ChromeMockRenderThread::print_preview_pages_remaining() { 198 int ChromeMockRenderThread::print_preview_pages_remaining() {
199 return print_preview_pages_remaining_; 199 return print_preview_pages_remaining_;
200 } 200 }
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | chrome/service/cloud_print/print_system_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698