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

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

Issue 12737006: Allow feedback form to be shown in an App Launcher feedback mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Touch up rebase Created 7 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
« 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #if defined(OS_CHROMEOS) 42 #if defined(OS_CHROMEOS)
43 #if defined(USE_SYSTEM_LIBBZ2) 43 #if defined(USE_SYSTEM_LIBBZ2)
44 #include <bzlib.h> 44 #include <bzlib.h>
45 #else 45 #else
46 #include "third_party/bzip2/bzlib.h" 46 #include "third_party/bzip2/bzlib.h"
47 #endif // USE_SYSTEM_LIBBZ2 47 #endif // USE_SYSTEM_LIBBZ2
48 #endif // OS_CHROMEOS 48 #endif // OS_CHROMEOS
49 49
50 using content::WebContents; 50 using content::WebContents;
51 51
52 namespace chrome {
53 const char kAppLauncherCategoryTag[] = "AppLauncher";
54 } // namespace chrome
55
52 const int kFeedbackVersion = 1; 56 const int kFeedbackVersion = 1;
53 57
54 const char kReportPhishingUrl[] = 58 const char kReportPhishingUrl[] =
55 "http://www.google.com/safebrowsing/report_phish/"; 59 "http://www.google.com/safebrowsing/report_phish/";
56 60
57 // URL to post bug reports to. 61 // URL to post bug reports to.
58 const char kFeedbackPostUrl[] = 62 const char kFeedbackPostUrl[] =
59 "https://www.google.com/tools/feedback/chrome/__submit"; 63 "https://www.google.com/tools/feedback/chrome/__submit";
60 64
61 const char kProtBufMimeType[] = "application/x-protobuf"; 65 const char kProtBufMimeType[] = "application/x-protobuf";
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 std::string* post_body = new std::string; 454 std::string* post_body = new std::string;
451 feedback_data.SerializeToString(post_body); 455 feedback_data.SerializeToString(post_body);
452 456
453 // We have the body of our POST, so send it off to the server with 0 delay 457 // We have the body of our POST, so send it off to the server with 0 delay
454 DispatchFeedback(data->profile(), post_body, 0); 458 DispatchFeedback(data->profile(), post_body, 0);
455 } 459 }
456 460
457 #if defined(FULL_SAFE_BROWSING) 461 #if defined(FULL_SAFE_BROWSING)
458 // static 462 // static
459 void FeedbackUtil::ReportPhishing(WebContents* current_tab, 463 void FeedbackUtil::ReportPhishing(WebContents* current_tab,
460 const std::string& phishing_url) { 464 const std::string& phishing_url) {
461 current_tab->GetController().LoadURL( 465 current_tab->GetController().LoadURL(
462 safe_browsing_util::GeneratePhishingReportUrl( 466 safe_browsing_util::GeneratePhishingReportUrl(
463 kReportPhishingUrl, phishing_url, 467 kReportPhishingUrl, phishing_url,
464 false /* not client-side detection */), 468 false /* not client-side detection */),
465 content::Referrer(), 469 content::Referrer(),
466 content::PAGE_TRANSITION_LINK, 470 content::PAGE_TRANSITION_LINK,
467 std::string()); 471 std::string());
468 } 472 }
469 #endif 473 #endif
470 474
(...skipping 18 matching lines...) Expand all
489 if (screenshot_size == NULL) 493 if (screenshot_size == NULL)
490 screenshot_size = new gfx::Rect(); 494 screenshot_size = new gfx::Rect();
491 return *screenshot_size; 495 return *screenshot_size;
492 } 496 }
493 497
494 // static 498 // static
495 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { 499 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) {
496 gfx::Rect& screen_size = GetScreenshotSize(); 500 gfx::Rect& screen_size = GetScreenshotSize();
497 screen_size = rect; 501 screen_size = rect;
498 } 502 }
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