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

Side by Side Diff: content/public/browser/host_zoom_map.h

Issue 10377144: Coverity: Fix pass by value errors in HostZoomMap::SetZoomLevel() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « content/browser/host_zoom_map_impl.cc ('k') | 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 #ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 // negative (to zoom out). 38 // negative (to zoom out).
39 // 39 //
40 // This may be called on any thread. 40 // This may be called on any thread.
41 virtual double GetZoomLevel(const std::string& host) const = 0; 41 virtual double GetZoomLevel(const std::string& host) const = 0;
42 42
43 // Sets the zoom level for the host or spec for a given url to |level|. If 43 // Sets the zoom level for the host or spec for a given url to |level|. If
44 // the level matches the current default zoom level, the host is erased 44 // the level matches the current default zoom level, the host is erased
45 // from the saved preferences; otherwise the new value is written out. 45 // from the saved preferences; otherwise the new value is written out.
46 // 46 //
47 // This should only be called on the UI thread. 47 // This should only be called on the UI thread.
48 virtual void SetZoomLevel(std::string host, double level) = 0; 48 virtual void SetZoomLevel(const std::string& host, double level) = 0;
49 49
50 // Get/Set the default zoom level for pages that don't override it. 50 // Get/Set the default zoom level for pages that don't override it.
51 virtual double GetDefaultZoomLevel() const = 0; 51 virtual double GetDefaultZoomLevel() const = 0;
52 virtual void SetDefaultZoomLevel(double level) = 0;; 52 virtual void SetDefaultZoomLevel(double level) = 0;;
53 53
54 protected: 54 protected:
55 virtual ~HostZoomMap() {} 55 virtual ~HostZoomMap() {}
56 }; 56 };
57 57
58 } // namespace content 58 } // namespace content
59 59
60 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 60 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
OLDNEW
« no previous file with comments | « content/browser/host_zoom_map_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698