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

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

Issue 10824033: Coverity: Fix several pass-by-values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win build fix. 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 | Annotate | Revision Log
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_WEB_UI_MESSAGE_HANDLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 24 matching lines...) Expand all
35 protected: 35 protected:
36 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractIntegerValue); 36 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractIntegerValue);
37 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractDoubleValue); 37 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractDoubleValue);
38 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractStringValue); 38 FRIEND_TEST_ALL_PREFIXES(WebUIMessageHandlerTest, ExtractStringValue);
39 39
40 // Helper methods: 40 // Helper methods:
41 41
42 // Adds "url" and "title" keys on incoming dictionary, setting title 42 // Adds "url" and "title" keys on incoming dictionary, setting title
43 // as the url as a fallback on empty title. 43 // as the url as a fallback on empty title.
44 static void SetURLAndTitle(base::DictionaryValue* dictionary, 44 static void SetURLAndTitle(base::DictionaryValue* dictionary,
45 string16 title, 45 const string16& title,
46 const GURL& gurl); 46 const GURL& gurl);
47 47
48 // Extract an integer value from a list Value. 48 // Extract an integer value from a list Value.
49 static bool ExtractIntegerValue(const base::ListValue* value, int* out_int); 49 static bool ExtractIntegerValue(const base::ListValue* value, int* out_int);
50 50
51 // Extract a floating point (double) value from a list Value. 51 // Extract a floating point (double) value from a list Value.
52 static bool ExtractDoubleValue(const base::ListValue* value, 52 static bool ExtractDoubleValue(const base::ListValue* value,
53 double* out_value); 53 double* out_value);
54 54
55 // Extract a string value from a list Value. 55 // Extract a string value from a list Value.
(...skipping 15 matching lines...) Expand all
71 friend class ::WebUIImpl; 71 friend class ::WebUIImpl;
72 friend class ::WebUIBrowserTest; 72 friend class ::WebUIBrowserTest;
73 73
74 WebUI* web_ui_; 74 WebUI* web_ui_;
75 }; 75 };
76 76
77 } // namespace content 77 } // namespace content
78 78
79 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_ 79 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
80 80
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_message_handler.cc ('k') | content/renderer/renderer_main_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698