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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/snippets/SnippetStorage.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }, 165 },
166 166
167 /** 167 /**
168 * @return {string} 168 * @return {string}
169 */ 169 */
170 get name() 170 get name()
171 { 171 {
172 return this._name; 172 return this._name;
173 }, 173 },
174 174
175 /**
176 * @param {string} name
177 */
175 set name(name) 178 set name(name)
176 { 179 {
177 if (this._name === name) 180 if (this._name === name)
178 return; 181 return;
179 182
180 this._name = name; 183 this._name = name;
181 this._storage._saveSettings(); 184 this._storage._saveSettings();
182 }, 185 },
183 186
184 /** 187 /**
185 * @return {string} 188 * @return {string}
186 */ 189 */
187 get content() 190 get content()
188 { 191 {
189 return this._content; 192 return this._content;
190 }, 193 },
191 194
195 /**
196 * @param {string} content
197 */
192 set content(content) 198 set content(content)
193 { 199 {
194 if (this._content === content) 200 if (this._content === content)
195 return; 201 return;
196 202
197 this._content = content; 203 this._content = content;
198 this._storage._saveSettings(); 204 this._storage._saveSettings();
199 }, 205 },
200 206
201 /** 207 /**
202 * @return {!Object} 208 * @return {!Object}
203 */ 209 */
204 serializeToObject: function() 210 serializeToObject: function()
205 { 211 {
206 var serializedSnippet = {}; 212 var serializedSnippet = {};
207 serializedSnippet.id = this.id; 213 serializedSnippet.id = this.id;
208 serializedSnippet.name = this.name; 214 serializedSnippet.name = this.name;
209 serializedSnippet.content = this.content; 215 serializedSnippet.content = this.content;
210 return serializedSnippet; 216 return serializedSnippet;
211 }, 217 },
212 218
213 __proto__: WebInspector.Object.prototype 219 __proto__: WebInspector.Object.prototype
214 }; 220 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698