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/bind.h" | 10 #include "base/bind.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 | 361 |
362 #if defined(ENABLE_SAFE_BROWSING) | 362 #if defined(ENABLE_SAFE_BROWSING) |
363 // static | 363 // static |
364 void BugReportUtil::ReportPhishing(TabContents* currentTab, | 364 void BugReportUtil::ReportPhishing(TabContents* currentTab, |
365 const std::string& phishing_url) { | 365 const std::string& phishing_url) { |
366 currentTab->controller().LoadURL( | 366 currentTab->controller().LoadURL( |
367 safe_browsing_util::GeneratePhishingReportUrl( | 367 safe_browsing_util::GeneratePhishingReportUrl( |
368 kReportPhishingUrl, phishing_url, | 368 kReportPhishingUrl, phishing_url, |
369 false /* not client-side detection */), | 369 false /* not client-side detection */), |
370 GURL(), | 370 content::Referrer(), |
371 content::PAGE_TRANSITION_LINK, | 371 content::PAGE_TRANSITION_LINK, |
372 std::string()); | 372 std::string()); |
373 } | 373 } |
374 #endif | 374 #endif |
375 | 375 |
376 static std::vector<unsigned char>* screenshot_png = NULL; | 376 static std::vector<unsigned char>* screenshot_png = NULL; |
377 static gfx::Rect* screenshot_size = NULL; | 377 static gfx::Rect* screenshot_size = NULL; |
378 | 378 |
379 // static | 379 // static |
380 std::vector<unsigned char>* BugReportUtil::GetScreenshotPng() { | 380 std::vector<unsigned char>* BugReportUtil::GetScreenshotPng() { |
(...skipping 13 matching lines...) Expand all Loading... |
394 if (screenshot_size == NULL) | 394 if (screenshot_size == NULL) |
395 screenshot_size = new gfx::Rect(); | 395 screenshot_size = new gfx::Rect(); |
396 return *screenshot_size; | 396 return *screenshot_size; |
397 } | 397 } |
398 | 398 |
399 // static | 399 // static |
400 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { | 400 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { |
401 gfx::Rect& screen_size = GetScreenshotSize(); | 401 gfx::Rect& screen_size = GetScreenshotSize(); |
402 screen_size = rect; | 402 screen_size = rect; |
403 } | 403 } |
OLD | NEW |