Lines Matching refs:result
114 if (const auto result = readExactlyOneElement(kTagComponentType, rootElement); result.ok()) { in readComponentType() local
115 componentTypeElement = *result; in readComponentType()
117 return Error() << "Failed to read tag '" << kTagComponentType << "': " << result.error(); in readComponentType()
269 if (const auto result = readExactlyOneElement(kTagComponentLevelThresholds, rootElement); in readComponentLevelThresholds() local
270 result.ok()) { in readComponentLevelThresholds()
271 componentLevelThresholdElement = *result; in readComponentLevelThresholds()
274 << "': " << result.error(); in readComponentLevelThresholds()
278 if (const auto result = readPerStateBytes(componentLevelThresholdElement); result.ok()) { in readComponentLevelThresholds() local
279 thresholds.perStateWriteBytes = *result; in readComponentLevelThresholds()
282 << thresholds.name << "': " << result.error(); in readComponentLevelThresholds()
300 if (const auto result = readPerStateBytes(childElement); result.ok()) { in readPerStateThresholds() local
301 threshold.perStateWriteBytes = *result; in readPerStateThresholds()
304 << "': " << result.error(); in readPerStateThresholds()
318 if (const auto result = readPerStateThresholds(childElement); result.ok()) { in readPackageSpecificThresholds() local
319 thresholds.insert(thresholds.end(), result->begin(), result->end()); in readPackageSpecificThresholds()
322 << kTagPackageSpecificThresholds << "': " << result.error(); in readPackageSpecificThresholds()
335 if (const auto result = readPerStateThresholds(childElement); result.ok()) { in readAppCategorySpecificThresholds() local
336 thresholds.insert(thresholds.end(), result->begin(), result->end()); in readAppCategorySpecificThresholds()
339 << kTagAppCategorySpecificThresholds << "': " << result.error(); in readAppCategorySpecificThresholds()
391 const auto result = readIoOveruseAlertThreshold(innerElement); in readSystemWideThresholds() local
392 if (!result.ok()) { in readSystemWideThresholds()
394 << kTagAlertThreshold << "': " << result.error(); in readSystemWideThresholds()
396 alertThresholds.push_back(*result); in readSystemWideThresholds()
405 if (const auto result = readExactlyOneElement(kTagIoOveruseConfiguration, rootElement); in readIoOveruseConfiguration() local
406 result.ok()) { in readIoOveruseConfiguration()
407 childElement = *result; in readIoOveruseConfiguration()
410 << "': " << result.error(); in readIoOveruseConfiguration()
413 if (const auto result = readComponentLevelThresholds(componentType, childElement); in readIoOveruseConfiguration() local
414 result.ok()) { in readIoOveruseConfiguration()
415 configuration.componentLevelThresholds = *result; in readIoOveruseConfiguration()
417 return Error() << "Failed to read component-level thresholds: " << result.error(); in readIoOveruseConfiguration()
419 if (const auto result = readPackageSpecificThresholds(childElement); result.ok()) { in readIoOveruseConfiguration() local
420 configuration.packageSpecificThresholds = *result; in readIoOveruseConfiguration()
422 return Error() << "Failed to read package specific thresholds: " << result.error(); in readIoOveruseConfiguration()
424 if (const auto result = readAppCategorySpecificThresholds(childElement); result.ok()) { in readIoOveruseConfiguration() local
425 configuration.categorySpecificThresholds = *result; in readIoOveruseConfiguration()
427 return Error() << "Failed to read category specific thresholds: " << result.error(); in readIoOveruseConfiguration()
429 if (const auto result = readSystemWideThresholds(childElement); result.ok()) { in readIoOveruseConfiguration() local
430 configuration.systemWideThresholds = *result; in readIoOveruseConfiguration()
432 return Error() << "Failed to read system-wide thresholds: " << result.error(); in readIoOveruseConfiguration()
520 if (const auto result = writeStateElement(kStateIdForegroundMode, in writePerStateBytes() local
522 !result.ok()) { in writePerStateBytes()
524 << "': " << result.error(); in writePerStateBytes()
526 if (const auto result = writeStateElement(kStateIdBackgroundMode, in writePerStateBytes() local
528 !result.ok()) { in writePerStateBytes()
530 << "': " << result.error(); in writePerStateBytes()
532 if (const auto result = in writePerStateBytes() local
534 !result.ok()) { in writePerStateBytes()
536 << "': " << result.error(); in writePerStateBytes()
548 if (const auto result = writePerStateBytes(thresholds.perStateWriteBytes, childElement); in writeComponentLevelThresholds() local
549 !result.ok()) { in writeComponentLevelThresholds()
550 return Error() << "Failed to write per-state bytes: " << result.error(); in writeComponentLevelThresholds()
563 if (const auto result = writePerStateBytes(thresholds.perStateWriteBytes, childElement); in writePerStateThresholds() local
564 !result.ok()) { in writePerStateThresholds()
565 return Error() << "Failed to write per-state bytes: " << result.error(); in writePerStateThresholds()
578 if (const auto result = writePerStateThresholds(threshold, childElement); !result.ok()) { in writePackageSpecificThresholds() local
580 << "': " << result.error(); in writePackageSpecificThresholds()
595 if (const auto result = writePerStateThresholds(threshold, childElement); !result.ok()) { in writeAppCategorySpecificThresholds() local
597 << "': " << result.error(); in writeAppCategorySpecificThresholds()
619 if (const auto result = in writeAlertThresholds() local
621 !result.ok()) { in writeAlertThresholds()
623 << "': " << result.error(); in writeAlertThresholds()
625 if (const auto result = writeParamElement(kParamIdWrittenBytesPerSecond, in writeAlertThresholds() local
627 !result.ok()) { in writeAlertThresholds()
629 << "': " << result.error(); in writeAlertThresholds()
642 if (const auto result = writeAlertThresholds(threshold, childElement); !result.ok()) { in writeSystemWideThresholds() local
643 return Error() << "Failed to write I/O overuse alert thresholds:" << result.error(); in writeSystemWideThresholds()
656 if (const auto result = in writeIoOveruseConfiguration() local
658 !result.ok()) { in writeIoOveruseConfiguration()
659 return Error() << "Failed to write component-wide thresholds: " << result.error(); in writeIoOveruseConfiguration()
661 if (const auto result = writePackageSpecificThresholds(configuration.packageSpecificThresholds, in writeIoOveruseConfiguration() local
663 !result.ok()) { in writeIoOveruseConfiguration()
664 return Error() << "Failed to write package specific thresholds: " << result.error(); in writeIoOveruseConfiguration()
666 if (const auto result = in writeIoOveruseConfiguration() local
669 !result.ok()) { in writeIoOveruseConfiguration()
670 return Error() << "Failed to write app category specific thresholds: " << result.error(); in writeIoOveruseConfiguration()
672 if (const auto result = in writeIoOveruseConfiguration() local
674 !result.ok()) { in writeIoOveruseConfiguration()
675 return Error() << "Failed to write system-wide thresholds: " << result.error(); in writeIoOveruseConfiguration()
695 if (const auto result = readComponentType(rootElement); result.ok()) { in parseXmlFile() local
696 configuration.componentType = *result; in parseXmlFile()
698 return Error() << "Failed to read component type: " << result.error(); in parseXmlFile()
700 if (const auto result = readSafeToKillPackages(rootElement); result.ok()) { in parseXmlFile() local
701 configuration.safeToKillPackages = *result; in parseXmlFile()
703 return Error() << "Failed to read safe-to-kill packages: " << result.error(); in parseXmlFile()
705 if (const auto result = readVendorPackagePrefixes(rootElement); result.ok()) { in parseXmlFile() local
706 configuration.vendorPackagePrefixes = *result; in parseXmlFile()
708 return Error() << "Failed to read vendor package prefixes: " << result.error(); in parseXmlFile()
710 if (const auto result = readPackageToAppCategoryTypes(rootElement); result.ok()) { in parseXmlFile() local
711 configuration.packageMetadata = *result; in parseXmlFile()
713 return Error() << "Failed to read package to app category types: " << result.error(); in parseXmlFile()
715 if (const auto result = readIoOveruseConfiguration(configuration.componentType, rootElement); in parseXmlFile() local
716 result.ok()) { in parseXmlFile()
718 ResourceSpecificConfiguration(*result)); in parseXmlFile()
720 return Error() << "Failed to read I/O overuse configuration: " << result.error(); in parseXmlFile()
740 if (const auto result = writeComponentType(configuration.componentType, rootElement); in writeXmlFile() local
741 !result.ok()) { in writeXmlFile()
742 return Error() << "Failed to write component type: " << result.error(); in writeXmlFile()
744 if (const auto result = writeSafeToKillPackages(configuration.safeToKillPackages, rootElement); in writeXmlFile() local
745 !result.ok()) { in writeXmlFile()
746 return Error() << "Failed to write safe-to-kill packages: " << result.error(); in writeXmlFile()
748 if (const auto result = in writeXmlFile() local
750 !result.ok()) { in writeXmlFile()
751 return Error() << "Failed to write vendor package prefixes: " << result.error(); in writeXmlFile()
753 if (const auto result = in writeXmlFile() local
755 !result.ok()) { in writeXmlFile()
756 return Error() << "Failed to write package to app category types: " << result.error(); in writeXmlFile()
766 if (const auto result = writeIoOveruseConfiguration(ioOveruseConfig, rootElement); in writeXmlFile() local
767 !result.ok()) { in writeXmlFile()
768 return Error() << "Failed to write I/O overuse configuration: " << result.error(); in writeXmlFile()