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/ui/tab_contents/core_tab_helper.h" | 5 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
13 #include "base/profiler/scoped_tracker.h" | 14 #include "base/profiler/scoped_tracker.h" |
14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
15 #include "build/build_config.h" | 16 #include "build/build_config.h" |
16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
18 #include "chrome/browser/ui/browser_command_controller.h" | 19 #include "chrome/browser/ui/browser_command_controller.h" |
19 #include "chrome/browser/ui/browser_finder.h" | 20 #include "chrome/browser/ui/browser_finder.h" |
20 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/render_messages.h" | 22 #include "chrome/common/render_messages.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 DCHECK(!content_type.empty()); | 365 DCHECK(!content_type.empty()); |
365 open_url_params.uses_post = true; | 366 open_url_params.uses_post = true; |
366 open_url_params.post_data = content::ResourceRequestBody::CreateFromBytes( | 367 open_url_params.post_data = content::ResourceRequestBody::CreateFromBytes( |
367 post_data.data(), post_data.size()); | 368 post_data.data(), post_data.size()); |
368 open_url_params.extra_headers += base::StringPrintf( | 369 open_url_params.extra_headers += base::StringPrintf( |
369 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, | 370 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, |
370 content_type.c_str()); | 371 content_type.c_str()); |
371 } | 372 } |
372 web_contents()->OpenURL(open_url_params); | 373 web_contents()->OpenURL(open_url_params); |
373 } | 374 } |
OLD | NEW |