anchor.diff:  // setSurveyActionTaken should only be called with the value of true, so
   // we can remove the extra complexity.
   void setSurveyActionTaken() async {
  -  final resp = await HttpRequest.request(
  -    // Format of request is e.g. api/setSurveyActionTaken?surveyActionTaken=true
  -    '${server.apiSetSurveyActionTaken}'
  -    '?${server.surveyActionTakenPropertyName}=true',
  -    method: 'POST',
  -  );
  -  if (resp.status == HttpStatus.ok) {
  -    assert(json.decode(resp.responseText) == true);
  -  } else {
  -    _logWarning(resp, server.apiSetSurveyActionTaken, resp.responseText);
  +  if (isDevToolsServerAvailable) {
  +    final resp = await _request(
  +      '${server.apiSetSurveyActionTaken}'
  +      '?${server.surveyActionTakenPropertyName}=true',
  +    );
  +    if (resp?.status == HttpStatus.ok) {
  +      assert(json.decode(resp.responseText) == true);
  +    } else {
  +      _logWarning(resp, server.apiSetSurveyActionTaken, resp.responseText);
  +    }
     }
   }
   
   /// Request DevTools property value 'surveyShownCount' stored in the file
   /// '~\.devtools'.
   Future<int> get surveyShownCount async {
  -  int surveyShownCount;
  -
  -  final resp = await HttpRequest.request(
  -    '${server.apiGetSurveyShownCount}',
  -    method: 'POST',
  -  );
  -  if (resp.status == HttpStatus.ok) {
  -    surveyShownCount = json.decode(resp.responseText);
  -  } else {
  -    _logWarning(resp, server.apiGetSurveyShownCount);
  -  }
  +  int surveyShownCount = 0;
  +
  +  if (isDevToolsServerAvailable) {
  +    final resp = await _request(server.apiGetSurveyShownCount);
  +    if (resp?.status == HttpStatus.ok) {
  +      surveyShownCount = json.decode(resp.responseText);
  +    } else {
  +      _logWarning(resp, server.apiGetSurveyShownCount);
  +    }
  +  }
  +
     return surveyShownCount;
   }
   
   /// Increment DevTools property value 'surveyShownCount' stored in the file
   /// '~\.devtools'.
   Future<int> get incrementSurveyShownCount async {
  -  // Any failure will still return 1.
  -  int surveyShownCount = 1;
  -
  -  final resp = await HttpRequest.request(
  -    server.apiIncrementSurveyShownCount,
  -    method: 'POST',
  -  );
  -  if (resp.status == HttpStatus.ok) {
  -    surveyShownCount = json.decode(resp.responseText);
  -  } else {
  -    _logWarning(resp, server.apiIncrementSurveyShownCount);
  +  // Any failure will still return 0.
  +  int surveyShownCount = 0;
  +
  +  if (isDevToolsServerAvailable) {
  +    final resp = await _request(server.apiIncrementSurveyShownCount);
  +    if (resp?.status == HttpStatus.ok) {
  +      surveyShownCount = json.decode(resp.responseText);
  +    } else {
  +      _logWarning(resp, server.apiIncrementSurveyShownCount);
  +    }
     }
     return surveyShownCount;
   }
  
positive.code:   external String get ide_launched;
  }
  
  void _logWarning(HttpRequest response, String apiType, [String respText]) {
    log(
      'HttpRequest $apiType failed status = ${response.status}'
      '${respText != null ? ', responseText = $respText' : ''}',
      LogLevel.warning,
    );
  
negative.code: 
    bool enabled = false;
  
    if (isDevToolsServerAvailable) {
      final resp = await _request(server.apiGetDevToolsEnabled);
      if (resp?.status == HttpStatus.ok) {
        enabled = json.decode(resp.responseText);
      } else {
        _logWarning(resp, server.apiGetDevToolsEnabled);
      }
    }
    _gaEnabled = enabled;
  
    return enabled;
  