| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 *os_version = "unknown"; | 167 *os_version = "unknown"; |
| 168 #endif | 168 #endif |
| 169 } | 169 } |
| 170 | 170 |
| 171 // static | 171 // static |
| 172 void FeedbackUtil::DispatchFeedback(Profile* profile, | 172 void FeedbackUtil::DispatchFeedback(Profile* profile, |
| 173 std::string* post_body, | 173 std::string* post_body, |
| 174 int64 delay) { | 174 int64 delay) { |
| 175 DCHECK(post_body); | 175 DCHECK(post_body); |
| 176 | 176 |
| 177 MessageLoop::current()->PostDelayedTask( | 177 base::MessageLoop::current()->PostDelayedTask( |
| 178 FROM_HERE, | 178 FROM_HERE, |
| 179 base::Bind(&FeedbackUtil::SendFeedback, profile, post_body, delay), | 179 base::Bind(&FeedbackUtil::SendFeedback, profile, post_body, delay), |
| 180 base::TimeDelta::FromMilliseconds(delay)); | 180 base::TimeDelta::FromMilliseconds(delay)); |
| 181 } | 181 } |
| 182 | 182 |
| 183 // static | 183 // static |
| 184 void FeedbackUtil::SendFeedback(Profile* profile, | 184 void FeedbackUtil::SendFeedback(Profile* profile, |
| 185 std::string* post_body, | 185 std::string* post_body, |
| 186 int64 previous_delay) { | 186 int64 previous_delay) { |
| 187 DCHECK(post_body); | 187 DCHECK(post_body); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if (screenshot_size == NULL) | 409 if (screenshot_size == NULL) |
| 410 screenshot_size = new gfx::Rect(); | 410 screenshot_size = new gfx::Rect(); |
| 411 return *screenshot_size; | 411 return *screenshot_size; |
| 412 } | 412 } |
| 413 | 413 |
| 414 // static | 414 // static |
| 415 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { | 415 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { |
| 416 gfx::Rect& screen_size = GetScreenshotSize(); | 416 gfx::Rect& screen_size = GetScreenshotSize(); |
| 417 screen_size = rect; | 417 screen_size = rect; |
| 418 } | 418 } |
| OLD | NEW |