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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 // Simple net::URLFetcherDelegate to clean up URLFetcher on completion. | 100 // Simple net::URLFetcherDelegate to clean up URLFetcher on completion. |
101 class FeedbackUtil::PostCleanup : public net::URLFetcherDelegate { | 101 class FeedbackUtil::PostCleanup : public net::URLFetcherDelegate { |
102 public: | 102 public: |
103 PostCleanup(Profile* profile, | 103 PostCleanup(Profile* profile, |
104 std::string* post_body, | 104 std::string* post_body, |
105 int64 previous_delay) : profile_(profile), | 105 int64 previous_delay) : profile_(profile), |
106 post_body_(post_body), | 106 post_body_(post_body), |
107 previous_delay_(previous_delay) { } | 107 previous_delay_(previous_delay) { } |
108 // Overridden from net::URLFetcherDelegate. | 108 // Overridden from net::URLFetcherDelegate. |
109 virtual void OnURLFetchComplete(const net::URLFetcher* source); | 109 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
110 | 110 |
111 protected: | 111 protected: |
112 virtual ~PostCleanup() {} | 112 virtual ~PostCleanup() {} |
113 | 113 |
114 private: | 114 private: |
115 Profile* profile_; | 115 Profile* profile_; |
116 std::string* post_body_; | 116 std::string* post_body_; |
117 int64 previous_delay_; | 117 int64 previous_delay_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(PostCleanup); | 119 DISALLOW_COPY_AND_ASSIGN(PostCleanup); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 if (screenshot_size == NULL) | 456 if (screenshot_size == NULL) |
457 screenshot_size = new gfx::Rect(); | 457 screenshot_size = new gfx::Rect(); |
458 return *screenshot_size; | 458 return *screenshot_size; |
459 } | 459 } |
460 | 460 |
461 // static | 461 // static |
462 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { | 462 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { |
463 gfx::Rect& screen_size = GetScreenshotSize(); | 463 gfx::Rect& screen_size = GetScreenshotSize(); |
464 screen_size = rect; | 464 screen_size = rect; |
465 } | 465 } |
OLD | NEW |