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

Side by Side Diff: printing/page_size_margins.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
« no previous file with comments | « net/http/http_response_headers.cc ('k') | remoting/host/policy_hack/policy_watcher.cc » ('j') | 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) 2011 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 "printing/page_size_margins.h" 5 #include "printing/page_size_margins.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "printing/print_job_constants.h" 9 #include "printing/print_job_constants.h"
10 10
11 namespace printing { 11 namespace printing {
12 12
13 void GetCustomMarginsFromJobSettings(const base::DictionaryValue& settings, 13 void GetCustomMarginsFromJobSettings(const base::DictionaryValue& settings,
14 PageSizeMargins* page_size_margins) { 14 PageSizeMargins* page_size_margins) {
15 DictionaryValue* custom_margins; 15 const DictionaryValue* custom_margins;
16 if (!settings.GetDictionary(kSettingMarginsCustom, &custom_margins) || 16 if (!settings.GetDictionary(kSettingMarginsCustom, &custom_margins) ||
17 !custom_margins->GetDouble(kSettingMarginTop, 17 !custom_margins->GetDouble(kSettingMarginTop,
18 &page_size_margins->margin_top) || 18 &page_size_margins->margin_top) ||
19 !custom_margins->GetDouble(kSettingMarginBottom, 19 !custom_margins->GetDouble(kSettingMarginBottom,
20 &page_size_margins->margin_bottom) || 20 &page_size_margins->margin_bottom) ||
21 !custom_margins->GetDouble(kSettingMarginLeft, 21 !custom_margins->GetDouble(kSettingMarginLeft,
22 &page_size_margins->margin_left) || 22 &page_size_margins->margin_left) ||
23 !custom_margins->GetDouble(kSettingMarginRight, 23 !custom_margins->GetDouble(kSettingMarginRight,
24 &page_size_margins->margin_right)) { 24 &page_size_margins->margin_right)) {
25 NOTREACHED(); 25 NOTREACHED();
26 } 26 }
27 } 27 }
28 28
29 } // namespace printing 29 } // namespace printing
OLDNEW
« no previous file with comments | « net/http/http_response_headers.cc ('k') | remoting/host/policy_hack/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698