Commit 4bceb6aa authored by kmadhusu@chromium.org's avatar kmadhusu@chromium.org

Coverity: Fix pass by value errors in HostZoomMap::SetZoomLevel() function.

CID=103250
BUG=none
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10377144

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137230 0039d316-1c4b-4281-b951-d872f2087c98
parent 0cc0a6c7
...@@ -71,7 +71,7 @@ double HostZoomMapImpl::GetZoomLevel(const std::string& host) const { ...@@ -71,7 +71,7 @@ double HostZoomMapImpl::GetZoomLevel(const std::string& host) const {
return (i == host_zoom_levels_.end()) ? default_zoom_level_ : i->second; return (i == host_zoom_levels_.end()) ? default_zoom_level_ : i->second;
} }
void HostZoomMapImpl::SetZoomLevel(std::string host, double level) { void HostZoomMapImpl::SetZoomLevel(const std::string& host, double level) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
{ {
......
...@@ -31,7 +31,7 @@ class CONTENT_EXPORT HostZoomMapImpl ...@@ -31,7 +31,7 @@ class CONTENT_EXPORT HostZoomMapImpl
// HostZoomMap implementation: // HostZoomMap implementation:
virtual void CopyFrom(HostZoomMap* copy) OVERRIDE; virtual void CopyFrom(HostZoomMap* copy) OVERRIDE;
virtual double GetZoomLevel(const std::string& host) const OVERRIDE; virtual double GetZoomLevel(const std::string& host) const OVERRIDE;
virtual void SetZoomLevel(std::string host, double level) OVERRIDE; virtual void SetZoomLevel(const std::string& host, double level) OVERRIDE;
virtual double GetDefaultZoomLevel() const OVERRIDE; virtual double GetDefaultZoomLevel() const OVERRIDE;
virtual void SetDefaultZoomLevel(double level) OVERRIDE; virtual void SetDefaultZoomLevel(double level) OVERRIDE;
......
...@@ -45,7 +45,7 @@ class HostZoomMap { ...@@ -45,7 +45,7 @@ class HostZoomMap {
// from the saved preferences; otherwise the new value is written out. // from the saved preferences; otherwise the new value is written out.
// //
// This should only be called on the UI thread. // This should only be called on the UI thread.
virtual void SetZoomLevel(std::string host, double level) = 0; virtual void SetZoomLevel(const std::string& host, double level) = 0;
// Get/Set the default zoom level for pages that don't override it. // Get/Set the default zoom level for pages that don't override it.
virtual double GetDefaultZoomLevel() const = 0; virtual double GetDefaultZoomLevel() const = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment