Coverity: Fixing pass by value.
CID=101462, 101458, 101437, 101471, 101467

BUG=NONE
TEST=NONE

Review URL: http://codereview.chromium.org/9006023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115257 0039d316-1c4b-4281-b951-d872f2087c98
DictionaryValue* PolicyStatusInfo::GetDictionaryValue() const {
  string16 level_string = GetPolicyLevelString(level);
  string16 source_type_string = GetSourceTypeString(source_type);
  string16 status_message =
      status == ENFORCED ? l10n_util::GetStringUTF16(IDS_OK) : error_message;
  DictionaryValue* result = new DictionaryValue();
  result->SetString(std::string(kNameDictPath), name);
  result->SetString(std::string(kLevelDictPath), level_string);
  result->SetString(std::string(kSourceTypeDictPath), source_type_string);
  result->Set(std::string(kValueDictPath), value->DeepCopy());
  result->SetBoolean(std::string(kSetDictPath), level != LEVEL_UNDEFINED);
  result->SetString(std::string(kStatusDictPath), status_message);

  return result;
}

DictionaryValue* PolicyStatusInfo::GetDictionaryValue() const {
  string16 level_string = GetPolicyLevelString(level);
  string16 source_type_string = GetSourceTypeString(source_type);
  string16 status_message =
      status == ENFORCED ? l10n_util::GetStringUTF16(IDS_OK) : error_message;
  DictionaryValue* result = new DictionaryValue();
  result->SetString(std::string(kNameDictPath), name);
  result->SetString(std::string(kLevelDictPath), level_string);
  result->SetString(std::string(kSourceTypeDictPath), source_type_string);
  result->Set(std::string(kValueDictPath), value->DeepCopy());
  result->SetBoolean(std::string(kSetDictPath), level != LEVEL_UNDEFINED);
  result->SetString(std::string(kStatusDictPath), status_message);

  return result;
}
