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

Side by Side Diff: Source/core/loader/FormSubmission.h

Issue 122993002: Make calls to AtomicString(const String&) explicit in web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use AtomicString type for frameName and target Created 6 years, 11 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 | « Source/core/loader/EmptyClients.cpp ('k') | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 Method method() const { return m_method; } 63 Method method() const { return m_method; }
64 static Method parseMethodType(const String&); 64 static Method parseMethodType(const String&);
65 void updateMethodType(const String&); 65 void updateMethodType(const String&);
66 static String methodString(Method); 66 static String methodString(Method);
67 67
68 const String& action() const { return m_action; } 68 const String& action() const { return m_action; }
69 void parseAction(const String&); 69 void parseAction(const String&);
70 70
71 const String& target() const { return m_target; } 71 const AtomicString& target() const { return m_target; }
72 void setTarget(const String& target) { m_target = target; } 72 void setTarget(const AtomicString& target) { m_target = target; }
73 73
74 const String& encodingType() const { return m_encodingType; } 74 const String& encodingType() const { return m_encodingType; }
75 static String parseEncodingType(const String&); 75 static String parseEncodingType(const String&);
76 void updateEncodingType(const String&); 76 void updateEncodingType(const String&);
77 bool isMultiPartForm() const { return m_isMultiPartForm; } 77 bool isMultiPartForm() const { return m_isMultiPartForm; }
78 78
79 const String& acceptCharset() const { return m_acceptCharset; } 79 const String& acceptCharset() const { return m_acceptCharset; }
80 void setAcceptCharset(const String& value) { m_acceptCharset = value; } 80 void setAcceptCharset(const String& value) { m_acceptCharset = value; }
81 81
82 void copyFrom(const Attributes&); 82 void copyFrom(const Attributes&);
83 83
84 private: 84 private:
85 Method m_method; 85 Method m_method;
86 bool m_isMultiPartForm; 86 bool m_isMultiPartForm;
87 87
88 String m_action; 88 String m_action;
89 String m_target; 89 AtomicString m_target;
90 String m_encodingType; 90 String m_encodingType;
91 String m_acceptCharset; 91 String m_acceptCharset;
92 }; 92 };
93 93
94 static PassRefPtr<FormSubmission> create(HTMLFormElement*, const Attributes& , PassRefPtr<Event> event, FormSubmissionTrigger); 94 static PassRefPtr<FormSubmission> create(HTMLFormElement*, const Attributes& , PassRefPtr<Event> event, FormSubmissionTrigger);
95 95
96 void populateFrameLoadRequest(FrameLoadRequest&); 96 void populateFrameLoadRequest(FrameLoadRequest&);
97 97
98 KURL requestURL() const; 98 KURL requestURL() const;
99 99
100 Method method() const { return m_method; } 100 Method method() const { return m_method; }
101 const KURL& action() const { return m_action; } 101 const KURL& action() const { return m_action; }
102 const String& target() const { return m_target; } 102 const AtomicString& target() const { return m_target; }
103 void clearTarget() { m_target = String(); } 103 void clearTarget() { m_target = nullAtom; }
104 const String& contentType() const { return m_contentType; } 104 const String& contentType() const { return m_contentType; }
105 FormState* state() const { return m_formState.get(); } 105 FormState* state() const { return m_formState.get(); }
106 FormData* data() const { return m_formData.get(); } 106 FormData* data() const { return m_formData.get(); }
107 const String boundary() const { return m_boundary; } 107 const String boundary() const { return m_boundary; }
108 Event* event() const { return m_event.get(); } 108 Event* event() const { return m_event.get(); }
109 109
110 const String& referrer() const { return m_referrer; } 110 const String& referrer() const { return m_referrer; }
111 void setReferrer(const String& referrer) { m_referrer = referrer; } 111 void setReferrer(const String& referrer) { m_referrer = referrer; }
112 const String& origin() const { return m_origin; } 112 const String& origin() const { return m_origin; }
113 void setOrigin(const String& origin) { m_origin = origin; } 113 void setOrigin(const String& origin) { m_origin = origin; }
114 114
115 const String& result() const { return m_result; } 115 const String& result() const { return m_result; }
116 116
117 private: 117 private:
118 FormSubmission(Method, const KURL& action, const String& target, const Strin g& contentType, PassRefPtr<FormState>, PassRefPtr<FormData>, const String& bound ary, PassRefPtr<Event>); 118 FormSubmission(Method, const KURL& action, const AtomicString& target, const String& contentType, PassRefPtr<FormState>, PassRefPtr<FormData>, const String& boundary, PassRefPtr<Event>);
119 // FormSubmission for DialogMethod 119 // FormSubmission for DialogMethod
120 FormSubmission(const String& result); 120 FormSubmission(const String& result);
121 121
122 // FIXME: Hold an instance of Attributes instead of individual members. 122 // FIXME: Hold an instance of Attributes instead of individual members.
123 Method m_method; 123 Method m_method;
124 KURL m_action; 124 KURL m_action;
125 String m_target; 125 AtomicString m_target;
126 String m_contentType; 126 String m_contentType;
127 RefPtr<FormState> m_formState; 127 RefPtr<FormState> m_formState;
128 RefPtr<FormData> m_formData; 128 RefPtr<FormData> m_formData;
129 String m_boundary; 129 String m_boundary;
130 RefPtr<Event> m_event; 130 RefPtr<Event> m_event;
131 String m_referrer; 131 String m_referrer;
132 String m_origin; 132 String m_origin;
133 String m_result; 133 String m_result;
134 }; 134 };
135 135
136 } 136 }
137 137
138 #endif // FormSubmission_h 138 #endif // FormSubmission_h
OLDNEW
« no previous file with comments | « Source/core/loader/EmptyClients.cpp ('k') | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698