| OLD | NEW |
| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 DCHECK(post_body); | 191 DCHECK(post_body); |
| 192 | 192 |
| 193 GURL post_url; | 193 GURL post_url; |
| 194 if (CommandLine::ForCurrentProcess()-> | 194 if (CommandLine::ForCurrentProcess()-> |
| 195 HasSwitch(switches::kFeedbackServer)) | 195 HasSwitch(switches::kFeedbackServer)) |
| 196 post_url = GURL(CommandLine::ForCurrentProcess()-> | 196 post_url = GURL(CommandLine::ForCurrentProcess()-> |
| 197 GetSwitchValueASCII(switches::kFeedbackServer)); | 197 GetSwitchValueASCII(switches::kFeedbackServer)); |
| 198 else | 198 else |
| 199 post_url = GURL(kFeedbackPostUrl); | 199 post_url = GURL(kFeedbackPostUrl); |
| 200 | 200 |
| 201 content::URLFetcher* fetcher = content::URLFetcher::Create( | 201 net::URLFetcher* fetcher = content::URLFetcher::Create( |
| 202 post_url, content::URLFetcher::POST, | 202 post_url, net::URLFetcher::POST, |
| 203 new FeedbackUtil::PostCleanup(profile, post_body, previous_delay)); | 203 new FeedbackUtil::PostCleanup(profile, post_body, previous_delay)); |
| 204 fetcher->SetRequestContext(profile->GetRequestContext()); | 204 fetcher->SetRequestContext(profile->GetRequestContext()); |
| 205 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES); | 205 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES); |
| 206 fetcher->SetUploadData(std::string(kProtBufMimeType), *post_body); | 206 fetcher->SetUploadData(std::string(kProtBufMimeType), *post_body); |
| 207 fetcher->Start(); | 207 fetcher->Start(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 // static | 211 // static |
| 212 void FeedbackUtil::AddFeedbackData( | 212 void FeedbackUtil::AddFeedbackData( |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (screenshot_size == NULL) | 414 if (screenshot_size == NULL) |
| 415 screenshot_size = new gfx::Rect(); | 415 screenshot_size = new gfx::Rect(); |
| 416 return *screenshot_size; | 416 return *screenshot_size; |
| 417 } | 417 } |
| 418 | 418 |
| 419 // static | 419 // static |
| 420 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { | 420 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { |
| 421 gfx::Rect& screen_size = GetScreenshotSize(); | 421 gfx::Rect& screen_size = GetScreenshotSize(); |
| 422 screen_size = rect; | 422 screen_size = rect; |
| 423 } | 423 } |
| OLD | NEW |