| OLD | NEW |
| 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/bug_report_util.h" | 5 #include "chrome/browser/bug_report_util.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 #if defined(ENABLE_SAFE_BROWSING) | 371 #if defined(ENABLE_SAFE_BROWSING) |
| 372 // static | 372 // static |
| 373 void BugReportUtil::ReportPhishing(TabContents* currentTab, | 373 void BugReportUtil::ReportPhishing(TabContents* currentTab, |
| 374 const std::string& phishing_url) { | 374 const std::string& phishing_url) { |
| 375 currentTab->controller().LoadURL( | 375 currentTab->controller().LoadURL( |
| 376 safe_browsing_util::GeneratePhishingReportUrl( | 376 safe_browsing_util::GeneratePhishingReportUrl( |
| 377 kReportPhishingUrl, phishing_url, | 377 kReportPhishingUrl, phishing_url, |
| 378 false /* not client-side detection */), | 378 false /* not client-side detection */), |
| 379 GURL(), | 379 GURL(), |
| 380 PageTransition::LINK, | 380 content::PAGE_TRANSITION_LINK, |
| 381 std::string()); | 381 std::string()); |
| 382 } | 382 } |
| 383 #endif | 383 #endif |
| 384 | 384 |
| 385 static std::vector<unsigned char>* screenshot_png = NULL; | 385 static std::vector<unsigned char>* screenshot_png = NULL; |
| 386 static gfx::Rect* screenshot_size = NULL; | 386 static gfx::Rect* screenshot_size = NULL; |
| 387 | 387 |
| 388 // static | 388 // static |
| 389 std::vector<unsigned char>* BugReportUtil::GetScreenshotPng() { | 389 std::vector<unsigned char>* BugReportUtil::GetScreenshotPng() { |
| 390 if (screenshot_png == NULL) | 390 if (screenshot_png == NULL) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 403 if (screenshot_size == NULL) | 403 if (screenshot_size == NULL) |
| 404 screenshot_size = new gfx::Rect(); | 404 screenshot_size = new gfx::Rect(); |
| 405 return *screenshot_size; | 405 return *screenshot_size; |
| 406 } | 406 } |
| 407 | 407 |
| 408 // static | 408 // static |
| 409 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { | 409 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { |
| 410 gfx::Rect& screen_size = GetScreenshotSize(); | 410 gfx::Rect& screen_size = GetScreenshotSize(); |
| 411 screen_size = rect; | 411 screen_size = rect; |
| 412 } | 412 } |
| OLD | NEW |