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

Side by Side Diff: chrome/browser/ui/webui/bug_report_ui.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/bug_report_ui.h" 5 #include "chrome/browser/ui/webui/bug_report_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 return; 626 return;
627 } 627 }
628 628
629 // #3 - Screenshot to send. 629 // #3 - Screenshot to send.
630 std::string screenshot_path; 630 std::string screenshot_path;
631 (*i)->GetAsString(&screenshot_path); 631 (*i)->GetAsString(&screenshot_path);
632 screenshot_path.erase(0, strlen(kScreenshotBaseUrl)); 632 screenshot_path.erase(0, strlen(kScreenshotBaseUrl));
633 633
634 // Get the image to send in the report. 634 // Get the image to send in the report.
635 std::vector<unsigned char> image; 635 std::vector<unsigned char> image;
636 if (screenshot_path.size() > 0) { 636 if (!screenshot_path.empty())
637 image = screenshot_source_->GetScreenshot(screenshot_path); 637 image = screenshot_source_->GetScreenshot(screenshot_path);
638 }
639 638
640 #if defined(OS_CHROMEOS) 639 #if defined(OS_CHROMEOS)
641 if (++i == list_value->end()) { 640 if (++i == list_value->end()) {
642 LOG(ERROR) << "Incorrect data passed to sendReport."; 641 LOG(ERROR) << "Incorrect data passed to sendReport.";
643 return; 642 return;
644 } 643 }
645 644
646 // #4 - User e-mail 645 // #4 - User e-mail
647 std::string user_email; 646 std::string user_email;
648 (*i)->GetAsString(&user_email); 647 (*i)->GetAsString(&user_email);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 BugReportHandler* handler = new BugReportHandler(tab); 735 BugReportHandler* handler = new BugReportHandler(tab);
737 AddMessageHandler((handler)->Attach(this)); 736 AddMessageHandler((handler)->Attach(this));
738 737
739 // The handler's init will specify which html 738 // The handler's init will specify which html
740 // resource we'll display to the user 739 // resource we'll display to the user
741 BugReportUIHTMLSource* html_source = 740 BugReportUIHTMLSource* html_source =
742 new BugReportUIHTMLSource(handler->Init()); 741 new BugReportUIHTMLSource(handler->Init());
743 // Set up the chrome://bugreport/ source. 742 // Set up the chrome://bugreport/ source.
744 tab->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 743 tab->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
745 } 744 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download_shelf_view.cc ('k') | chrome/browser/ui/window_snapshot/window_snapshot_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698