tools/flags/generate_unexpire_flags.py
def gen_features_header(prog_name, mstone):
  """Generate a header file declaring features and the expiry predicate.

  This header declares the features and function described in
  gen_features_impl().
  """
  body = file_header(prog_name)

  body += """
#ifndef GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
#define GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_

namespace flags {

"""

  for m in recent_mstones(mstone):
    body += 'extern const base::Feature kUnexpireFlagsM{m};\n'.format(m=m)

  body += """
// Returns the base::Feature used to decide whether flag expiration is enabled
// for a given milestone, if there is such a feature. If not, returns nullptr.
const base::Feature* GetUnexpireFeatureForMilestone(int milestone);

}  // namespace flags

#endif  // GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
"""

  return body
Generate a header file declaring features and the expiry predicate.

  This header declares the features and function described in
  gen_features_impl().
  
Generate a header file declaring features and the expiry predicate.
This header declares the features and function described in
gen_features_impl().
Generate a header file declaring features and the expiry predicate . This header declares the features and function described in gen_features_impl () .
def gen_features_header(prog_name, mstone):
  body = file_header(prog_name)
  body += """
#ifndef GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
#define GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
namespace flags {
"""
  for m in recent_mstones(mstone):
    body += 'extern const base::Feature kUnexpireFlagsM{m};\n'.format(m=m)
  body += """
// Returns the base::Feature used to decide whether flag expiration is enabled
// for a given milestone, if there is such a feature. If not, returns nullptr.
const base::Feature* GetUnexpireFeatureForMilestone(int milestone);
}  // namespace flags
#endif  // GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
"""
  return body
def gen_features_header ( prog_name , mstone ) : body = file_header ( prog_name ) body += """
#ifndef GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
#define GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_

namespace flags {

""" for m in recent_mstones ( mstone ) : body += 'extern const base::Feature kUnexpireFlagsM{m};\n' . format ( m = m ) body += """
// Returns the base::Feature used to decide whether flag expiration is enabled
// for a given milestone, if there is such a feature. If not, returns nullptr.
const base::Feature* GetUnexpireFeatureForMilestone(int milestone);

}  // namespace flags

#endif  // GEN_CHROME_BROWSER_UNEXPIRE_FLAGS_GEN_H_
""" return body
Generate a header file declaring features and the expiry predicate.
Generate a header file declaring features and the expiry predicate .
"""Generate a header file declaring features and the expiry predicate.

  This header declares the features and function described in
  gen_features_impl().
  """
prog_name
mstone