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 "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 net::CookieStore* cookie_store = | 185 net::CookieStore* cookie_store = |
186 context_getter->GetURLRequestContext()->cookie_store(); | 186 context_getter->GetURLRequestContext()->cookie_store(); |
187 cookie_store->SetCookieWithOptionsAsync( | 187 cookie_store->SetCookieWithOptionsAsync( |
188 url, value, net::CookieOptions(), | 188 url, value, net::CookieOptions(), |
189 base::Bind(&SetCookieCallback, result, event)); | 189 base::Bind(&SetCookieCallback, result, event)); |
190 } | 190 } |
191 | 191 |
192 } // namespace | 192 } // namespace |
193 | 193 |
194 | 194 |
195 GURL GetFileUrlWithQuery(const FilePath& path, | 195 GURL GetFileUrlWithQuery(const base::FilePath& path, |
196 const std::string& query_string) { | 196 const std::string& query_string) { |
197 GURL url = net::FilePathToFileURL(path); | 197 GURL url = net::FilePathToFileURL(path); |
198 if (!query_string.empty()) { | 198 if (!query_string.empty()) { |
199 GURL::Replacements replacements; | 199 GURL::Replacements replacements; |
200 replacements.SetQueryStr(query_string); | 200 replacements.SetQueryStr(query_string); |
201 return url.ReplaceComponents(replacements); | 201 return url.ReplaceComponents(replacements); |
202 } | 202 } |
203 return url; | 203 return url; |
204 } | 204 } |
205 | 205 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 } | 496 } |
497 // The queue should not be empty, unless we were quit because of a timeout. | 497 // The queue should not be empty, unless we were quit because of a timeout. |
498 if (message_queue_.empty()) | 498 if (message_queue_.empty()) |
499 return false; | 499 return false; |
500 if (message) | 500 if (message) |
501 *message = message_queue_.front(); | 501 *message = message_queue_.front(); |
502 return true; | 502 return true; |
503 } | 503 } |
504 | 504 |
505 } // namespace content | 505 } // namespace content |
OLD | NEW |