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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 profile = browser->profile(); | 125 profile = browser->profile(); |
126 } else { | 126 } else { |
127 profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); | 127 profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); |
128 } | 128 } |
129 if (!profile) { | 129 if (!profile) { |
130 LOG(ERROR) << "Cannot invoke feedback: No profile found!"; | 130 LOG(ERROR) << "Cannot invoke feedback: No profile found!"; |
131 return; | 131 return; |
132 } | 132 } |
133 | 133 |
134 extensions::FeedbackPrivateAPI* api = | 134 extensions::FeedbackPrivateAPI* api = |
135 extensions::FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( | 135 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); |
136 profile); | |
137 | 136 |
138 api->RequestFeedback(description_template, | 137 api->RequestFeedback(description_template, |
139 category_tag, | 138 category_tag, |
140 page_url); | 139 page_url); |
141 } | 140 } |
142 | 141 |
143 } // namespace chrome | 142 } // namespace chrome |
144 | 143 |
145 namespace feedback_util { | 144 namespace feedback_util { |
146 | 145 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 zip::Zip(temp_path, zip_file, false) && | 262 zip::Zip(temp_path, zip_file, false) && |
264 base::ReadFileToString(zip_file, compressed_logs); | 263 base::ReadFileToString(zip_file, compressed_logs); |
265 | 264 |
266 base::DeleteFile(temp_path, true); | 265 base::DeleteFile(temp_path, true); |
267 base::DeleteFile(zip_file, false); | 266 base::DeleteFile(zip_file, false); |
268 | 267 |
269 return succeed; | 268 return succeed; |
270 } | 269 } |
271 | 270 |
272 } // namespace feedback_util | 271 } // namespace feedback_util |
OLD | NEW |