| 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/intents/cws_intents_registry.h" | 5 #include "chrome/browser/intents/cws_intents_registry.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/net/browser_url_util.h" | 13 #include "chrome/browser/net/browser_url_util.h" |
| 14 #include "chrome/browser/net/chrome_url_request_context.h" | 14 #include "chrome/browser/net/chrome_url_request_context.h" |
| 15 #include "chrome/browser/webdata/web_data_service.h" | 15 #include "chrome/browser/webdata/web_data_service.h" |
| 16 #include "content/public/common/url_fetcher.h" | 16 #include "content/public/common/url_fetcher.h" |
| 17 #include "net/base/mime_util.h" | 17 #include "net/base/mime_util.h" |
| 18 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 // static | 149 // static |
| 150 GURL CWSIntentsRegistry::BuildQueryURL(const string16& action, | 150 GURL CWSIntentsRegistry::BuildQueryURL(const string16& action, |
| 151 const string16& type) { | 151 const string16& type) { |
| 152 GURL request(kCWSIntentServiceURL); | 152 GURL request(kCWSIntentServiceURL); |
| 153 request = chrome_browser_net::AppendQueryParameter(request, "intent", | 153 request = chrome_browser_net::AppendQueryParameter(request, "intent", |
| 154 UTF16ToUTF8(action)); | 154 UTF16ToUTF8(action)); |
| 155 return chrome_browser_net::AppendQueryParameter(request, "mime_types", | 155 return chrome_browser_net::AppendQueryParameter(request, "mime_types", |
| 156 UTF16ToUTF8(type)); | 156 UTF16ToUTF8(type)); |
| 157 } | 157 } |
| OLD | NEW |