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

Side by Side Diff: content/browser/host_zoom_map_impl.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 | « no previous file | content/browser/host_zoom_map_impl.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) 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_BROWSER_HOST_ZOOM_MAP_IMPL_H_ 5 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_
6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ 6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 13 matching lines...) Expand all
24 : public NON_EXPORTED_BASE(content::HostZoomMap), 24 : public NON_EXPORTED_BASE(content::HostZoomMap),
25 public content::NotificationObserver, 25 public content::NotificationObserver,
26 public base::SupportsUserData::Data { 26 public base::SupportsUserData::Data {
27 public: 27 public:
28 HostZoomMapImpl(); 28 HostZoomMapImpl();
29 virtual ~HostZoomMapImpl(); 29 virtual ~HostZoomMapImpl();
30 30
31 // HostZoomMap implementation: 31 // HostZoomMap implementation:
32 virtual void CopyFrom(HostZoomMap* copy) OVERRIDE; 32 virtual void CopyFrom(HostZoomMap* copy) OVERRIDE;
33 virtual double GetZoomLevel(const std::string& host) const OVERRIDE; 33 virtual double GetZoomLevel(const std::string& host) const OVERRIDE;
34 virtual void SetZoomLevel(std::string host, double level) OVERRIDE; 34 virtual void SetZoomLevel(const std::string& host, double level) OVERRIDE;
35 virtual double GetDefaultZoomLevel() const OVERRIDE; 35 virtual double GetDefaultZoomLevel() const OVERRIDE;
36 virtual void SetDefaultZoomLevel(double level) OVERRIDE; 36 virtual void SetDefaultZoomLevel(double level) OVERRIDE;
37 37
38 // Returns the temporary zoom level that's only valid for the lifetime of 38 // Returns the temporary zoom level that's only valid for the lifetime of
39 // the given WebContents (i.e. isn't saved and doesn't affect other 39 // the given WebContents (i.e. isn't saved and doesn't affect other
40 // WebContentses) if it exists, the default zoom level otherwise. 40 // WebContentses) if it exists, the default zoom level otherwise.
41 // 41 //
42 // This may be called on any thread. 42 // This may be called on any thread.
43 double GetTemporaryZoomLevel(int render_process_id, 43 double GetTemporaryZoomLevel(int render_process_id,
44 int render_view_id) const; 44 int render_view_id) const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and 76 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and
77 // |temporary_zoom_levels_| to guarantee thread safety. 77 // |temporary_zoom_levels_| to guarantee thread safety.
78 mutable base::Lock lock_; 78 mutable base::Lock lock_;
79 79
80 content::NotificationRegistrar registrar_; 80 content::NotificationRegistrar registrar_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); 82 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl);
83 }; 83 };
84 84
85 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ 85 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698