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

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

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove static class initializations. Created 8 years, 11 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
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 *os_version = "unknown"; 165 *os_version = "unknown";
166 #endif 166 #endif
167 } 167 }
168 168
169 // static 169 // static
170 void FeedbackUtil::DispatchFeedback(Profile* profile, 170 void FeedbackUtil::DispatchFeedback(Profile* profile,
171 std::string* post_body, 171 std::string* post_body,
172 int64 delay) { 172 int64 delay) {
173 DCHECK(post_body); 173 DCHECK(post_body);
174 174
175 MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind( 175 MessageLoop::current()->PostDelayedTask(
176 &FeedbackUtil::SendFeedback, profile, post_body, delay), delay); 176 FROM_HERE,
177 base::Bind(&FeedbackUtil::SendFeedback, profile, post_body, delay),
178 base::TimeDelta::FromMilliseconds(delay));
177 } 179 }
178 180
179 // static 181 // static
180 void FeedbackUtil::SendFeedback(Profile* profile, 182 void FeedbackUtil::SendFeedback(Profile* profile,
181 std::string* post_body, 183 std::string* post_body,
182 int64 previous_delay) { 184 int64 previous_delay) {
183 DCHECK(post_body); 185 DCHECK(post_body);
184 186
185 GURL post_url; 187 GURL post_url;
186 if (CommandLine::ForCurrentProcess()-> 188 if (CommandLine::ForCurrentProcess()->
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 if (screenshot_size == NULL) 404 if (screenshot_size == NULL)
403 screenshot_size = new gfx::Rect(); 405 screenshot_size = new gfx::Rect();
404 return *screenshot_size; 406 return *screenshot_size;
405 } 407 }
406 408
407 // static 409 // static
408 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { 410 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) {
409 gfx::Rect& screen_size = GetScreenshotSize(); 411 gfx::Rect& screen_size = GetScreenshotSize();
410 screen_size = rect; 412 screen_size = rect;
411 } 413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698