| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 *os_version = "unknown"; | 169 *os_version = "unknown"; |
| 170 #endif | 170 #endif |
| 171 } | 171 } |
| 172 | 172 |
| 173 // static | 173 // static |
| 174 void FeedbackUtil::DispatchFeedback(Profile* profile, | 174 void FeedbackUtil::DispatchFeedback(Profile* profile, |
| 175 std::string* post_body, | 175 std::string* post_body, |
| 176 int64 delay) { | 176 int64 delay) { |
| 177 DCHECK(post_body); | 177 DCHECK(post_body); |
| 178 | 178 |
| 179 MessageLoop::current()->PostDelayedTask( | 179 base::MessageLoop::current()->PostDelayedTask( |
| 180 FROM_HERE, | 180 FROM_HERE, |
| 181 base::Bind(&FeedbackUtil::SendFeedback, profile, post_body, delay), | 181 base::Bind(&FeedbackUtil::SendFeedback, profile, post_body, delay), |
| 182 base::TimeDelta::FromMilliseconds(delay)); | 182 base::TimeDelta::FromMilliseconds(delay)); |
| 183 } | 183 } |
| 184 | 184 |
| 185 // static | 185 // static |
| 186 void FeedbackUtil::SendFeedback(Profile* profile, | 186 void FeedbackUtil::SendFeedback(Profile* profile, |
| 187 std::string* post_body, | 187 std::string* post_body, |
| 188 int64 previous_delay) { | 188 int64 previous_delay) { |
| 189 DCHECK(post_body); | 189 DCHECK(post_body); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 if (screenshot_size == NULL) | 417 if (screenshot_size == NULL) |
| 418 screenshot_size = new gfx::Rect(); | 418 screenshot_size = new gfx::Rect(); |
| 419 return *screenshot_size; | 419 return *screenshot_size; |
| 420 } | 420 } |
| 421 | 421 |
| 422 // static | 422 // static |
| 423 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { | 423 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { |
| 424 gfx::Rect& screen_size = GetScreenshotSize(); | 424 gfx::Rect& screen_size = GetScreenshotSize(); |
| 425 screen_size = rect; | 425 screen_size = rect; |
| 426 } | 426 } |
| OLD | NEW |