OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/child/dwrite_font_proxy/dwrite_font_proxy_win.h" | 5 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 CHECK(SUCCEEDED(hr)); | 442 CHECK(SUCCEEDED(hr)); |
443 return SUCCEEDED(hr); | 443 return SUCCEEDED(hr); |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 DCHECK_LE(family_count, 1u); | 447 DCHECK_LE(family_count, 1u); |
448 | 448 |
449 if (family_count == 0) { | 449 if (family_count == 0) { |
450 // This is really strange, we successfully loaded no fonts?! | 450 // This is really strange, we successfully loaded no fonts?! |
451 LogLoadFamilyResult(LOAD_FAMILY_ERROR_NO_FAMILIES); | 451 LogLoadFamilyResult(LOAD_FAMILY_ERROR_NO_FAMILIES); |
452 CHECK(false); | |
453 return false; | 452 return false; |
454 } | 453 } |
455 | 454 |
456 LogLoadFamilyResult(family_count == 1 ? LOAD_FAMILY_SUCCESS_SINGLE_FAMILY | 455 LogLoadFamilyResult(family_count == 1 ? LOAD_FAMILY_SUCCESS_SINGLE_FAMILY |
457 : LOAD_FAMILY_ERROR_MULTIPLE_FAMILIES); | 456 : LOAD_FAMILY_ERROR_MULTIPLE_FAMILIES); |
458 | 457 |
459 hr = collection->GetFontFamily(0, &family_); | 458 hr = collection->GetFontFamily(0, &family_); |
460 | 459 |
461 CHECK(SUCCEEDED(hr)); | 460 CHECK(SUCCEEDED(hr)); |
462 | 461 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 const base::string16& file_name) { | 546 const base::string16& file_name) { |
548 data_.Initialize(base::FilePath(file_name)); | 547 data_.Initialize(base::FilePath(file_name)); |
549 if (!data_.IsValid()) { | 548 if (!data_.IsValid()) { |
550 CHECK(false); | 549 CHECK(false); |
551 return E_FAIL; | 550 return E_FAIL; |
552 } | 551 } |
553 return S_OK; | 552 return S_OK; |
554 } | 553 } |
555 | 554 |
556 } // namespace content | 555 } // namespace content |
OLD | NEW |