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

Side by Side Diff: chrome/browser/feedback/feedback_util.cc

Issue 10832078: Add the user email field to Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/feedback/feedback_util.h ('k') | chrome/browser/resources/feedback.css » ('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 #include "chrome/browser/feedback/feedback_util.h" 5 #include "chrome/browser/feedback/feedback_util.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return true; 239 return true;
240 } 240 }
241 #endif 241 #endif
242 242
243 // static 243 // static
244 void FeedbackUtil::SendReport( 244 void FeedbackUtil::SendReport(
245 Profile* profile 245 Profile* profile
246 , const std::string& category_tag 246 , const std::string& category_tag
247 , const std::string& page_url_text 247 , const std::string& page_url_text
248 , const std::string& description 248 , const std::string& description
249 , const std::string& user_email_text
249 , ScreenshotDataPtr image_data_ptr 250 , ScreenshotDataPtr image_data_ptr
250 , int png_width 251 , int png_width
251 , int png_height 252 , int png_height
252 #if defined(OS_CHROMEOS) 253 #if defined(OS_CHROMEOS)
253 , const std::string& user_email_text
254 , const char* zipped_logs_data 254 , const char* zipped_logs_data
255 , int zipped_logs_length 255 , int zipped_logs_length
256 , const chromeos::system::LogDictionaryType* const sys_info 256 , const chromeos::system::LogDictionaryType* const sys_info
257 , const std::string& timestamp 257 , const std::string& timestamp
258 #endif 258 #endif
259 ) { 259 ) {
260 // Create google feedback protocol buffer objects 260 // Create google feedback protocol buffer objects
261 userfeedback::ExtensionSubmit feedback_data; 261 userfeedback::ExtensionSubmit feedback_data;
262 // type id set to 0, unused field but needs to be initialized to 0 262 // type id set to 0, unused field but needs to be initialized to 0
263 feedback_data.set_type_id(0); 263 feedback_data.set_type_id(0);
264 264
265 userfeedback::CommonData* common_data = feedback_data.mutable_common_data(); 265 userfeedback::CommonData* common_data = feedback_data.mutable_common_data();
266 userfeedback::WebData* web_data = feedback_data.mutable_web_data(); 266 userfeedback::WebData* web_data = feedback_data.mutable_web_data();
267 267
268 // Set GAIA id to 0. We're not using gaia id's for recording 268 // Set GAIA id to 0. We're not using gaia id's for recording
269 // use feedback - we're using the e-mail field, allows users to 269 // use feedback - we're using the e-mail field, allows users to
270 // submit feedback from incognito mode and specify any mail id 270 // submit feedback from incognito mode and specify any mail id
271 // they wish 271 // they wish
272 common_data->set_gaia_id(0); 272 common_data->set_gaia_id(0);
273 273
274 #if defined(OS_CHROMEOS)
275 // Add the user e-mail to the feedback object 274 // Add the user e-mail to the feedback object
276 common_data->set_user_email(user_email_text); 275 common_data->set_user_email(user_email_text);
277 #endif
278 276
279 // Add the description to the feedback object 277 // Add the description to the feedback object
280 common_data->set_description(description); 278 common_data->set_description(description);
281 279
282 // Add the language 280 // Add the language
283 std::string chrome_locale = g_browser_process->GetApplicationLocale(); 281 std::string chrome_locale = g_browser_process->GetApplicationLocale();
284 common_data->set_source_description_language(chrome_locale); 282 common_data->set_source_description_language(chrome_locale);
285 283
286 // Set the url 284 // Set the url
287 web_data->set_url(page_url_text); 285 web_data->set_url(page_url_text);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (screenshot_size == NULL) 413 if (screenshot_size == NULL)
416 screenshot_size = new gfx::Rect(); 414 screenshot_size = new gfx::Rect();
417 return *screenshot_size; 415 return *screenshot_size;
418 } 416 }
419 417
420 // static 418 // static
421 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { 419 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) {
422 gfx::Rect& screen_size = GetScreenshotSize(); 420 gfx::Rect& screen_size = GetScreenshotSize();
423 screen_size = rect; 421 screen_size = rect;
424 } 422 }
OLDNEW
« no previous file with comments | « chrome/browser/feedback/feedback_util.h ('k') | chrome/browser/resources/feedback.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698