1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "extensions/browser/api/cast_channel/cast_auth_util.h" 6 7namespace extensions { 8namespace core_api { 9namespace cast_channel { 10 11AuthResult::AuthResult() : error_type(ERROR_NONE), nss_error_code(0) { 12} 13 14AuthResult::~AuthResult() { 15} 16 17// static 18AuthResult AuthResult::Create(const std::string& error_message, 19 ErrorType error_type) { 20 return AuthResult(error_message, error_type, 0); 21} 22 23// static 24AuthResult AuthResult::CreateWithNSSError(const std::string& error_message, 25 ErrorType error_type, 26 int nss_error_code) { 27 return AuthResult(error_message, error_type, nss_error_code); 28} 29 30AuthResult::AuthResult(const std::string& error_message, 31 ErrorType error_type, 32 int nss_error_code) 33 : error_message(error_message), 34 error_type(error_type), 35 nss_error_code(nss_error_code) { 36} 37 38} // namespace cast_channel 39} // namespace core_api 40} // namespace extensions 41