| 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_frame/utils.h" | 5 #include "chrome_frame/utils.h" |
| 6 | 6 |
| 7 #include <atlsafe.h> | 7 #include <atlsafe.h> |
| 8 #include <atlsecurity.h> | 8 #include <atlsecurity.h> |
| 9 #include <htiframe.h> | 9 #include <htiframe.h> |
| 10 #include <mshtml.h> | 10 #include <mshtml.h> |
| 11 #include <shlobj.h> | 11 #include <shlobj.h> |
| 12 | 12 |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/file_version_info.h" | 14 #include "base/file_version_info.h" |
| 15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 19 #include "base/string_piece.h" | 19 #include "base/string_piece.h" |
| 20 #include "base/string_tokenizer.h" | |
| 21 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 22 #include "base/stringprintf.h" | 21 #include "base/stringprintf.h" |
| 22 #include "base/strings/string_tokenizer.h" |
| 23 #include "base/threading/thread_local.h" | 23 #include "base/threading/thread_local.h" |
| 24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
| 25 #include "base/win/registry.h" | 25 #include "base/win/registry.h" |
| 26 #include "base/win/scoped_bstr.h" | 26 #include "base/win/scoped_bstr.h" |
| 27 #include "base/win/scoped_comptr.h" | 27 #include "base/win/scoped_comptr.h" |
| 28 #include "base/win/scoped_variant.h" | 28 #include "base/win/scoped_variant.h" |
| 29 #include "chrome/common/automation_messages.h" | 29 #include "chrome/common/automation_messages.h" |
| 30 #include "chrome/common/chrome_paths_internal.h" | 30 #include "chrome/common/chrome_paths_internal.h" |
| 31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
| 32 #include "chrome/installer/util/chrome_frame_distribution.h" | 32 #include "chrome/installer/util/chrome_frame_distribution.h" |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 return ParseAttachExternalTabUrl(); | 1394 return ParseAttachExternalTabUrl(); |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 bool ChromeFrameUrl::ParseAttachExternalTabUrl() { | 1397 bool ChromeFrameUrl::ParseAttachExternalTabUrl() { |
| 1398 std::string query = parsed_url_.query(); | 1398 std::string query = parsed_url_.query(); |
| 1399 if (!StartsWithASCII(query, kAttachExternalTabPrefix, false)) { | 1399 if (!StartsWithASCII(query, kAttachExternalTabPrefix, false)) { |
| 1400 return parsed_url_.is_valid(); | 1400 return parsed_url_.is_valid(); |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 attach_to_external_tab_ = true; | 1403 attach_to_external_tab_ = true; |
| 1404 StringTokenizer tokenizer(query, "&"); | 1404 base::StringTokenizer tokenizer(query, "&"); |
| 1405 // Skip over kChromeAttachExternalTabPrefix | 1405 // Skip over kChromeAttachExternalTabPrefix |
| 1406 tokenizer.GetNext(); | 1406 tokenizer.GetNext(); |
| 1407 // Read the following items in order. | 1407 // Read the following items in order. |
| 1408 // 1. cookie | 1408 // 1. cookie |
| 1409 // 2. disposition | 1409 // 2. disposition |
| 1410 // 3. dimension.x | 1410 // 3. dimension.x |
| 1411 // 4. dimension.y | 1411 // 4. dimension.y |
| 1412 // 5. dimension.width | 1412 // 5. dimension.width |
| 1413 // 6. dimension.height. | 1413 // 6. dimension.height. |
| 1414 if (tokenizer.GetNext()) { | 1414 if (tokenizer.GetNext()) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 wininet_connection_count_updated = true; | 1671 wininet_connection_count_updated = true; |
| 1672 return true; | 1672 return true; |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 void GetChromeFrameProfilePath(const string16& profile_name, | 1675 void GetChromeFrameProfilePath(const string16& profile_name, |
| 1676 FilePath* profile_path) { | 1676 FilePath* profile_path) { |
| 1677 chrome::GetChromeFrameUserDataDirectory(profile_path); | 1677 chrome::GetChromeFrameUserDataDirectory(profile_path); |
| 1678 *profile_path = profile_path->Append(profile_name); | 1678 *profile_path = profile_path->Append(profile_name); |
| 1679 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); | 1679 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); |
| 1680 } | 1680 } |
| OLD | NEW |