<commit_before>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "chrome/browser/cocoa/import_progress_dialog.h"

#include "app/l10n_util_mac.h"
#include "base/logging.h"
#include "base/mac_util.h"
#include "base/message_loop.h"
#import "base/scoped_nsobject.h"
#import "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"

namespace {

// Convert ImportItem enum into the name of the ImportProgressDialogController
// property corresponding to the text for that item, this makes the code to
// change the values for said properties much more readable.
NSString* keyForImportItem(importer::ImportItem item) {
  switch(item) {
    case importer::HISTORY:
      return @"historyStatusText";
    case importer::FAVORITES:
      return @"favoritesStatusText";
    case importer::PASSWORDS:
      return @"savedPasswordStatusText";
    case importer::SEARCH_ENGINES:
      return @"searchStatusText";
    default:
      DCHECK(false);
      break;
  }
  return nil;
}

}  // namespace

@implementation ImportProgressDialogController

@synthesize explanatoryText = explanatory_text_;
@synthesize favoritesStatusText = favorites_status_text_;
@synthesize searchStatusText = search_status_text_;
@synthesize savedPasswordStatusText = saved_password_status_text_;
@synthesize historyStatusText = history_status_text_;

@synthesize favoritesImportEnabled = favorites_import_enabled_;
@synthesize searchImportEnabled = search_import_enabled_;
@synthesize passwordImportEnabled = password_import_enabled_;
@synthesize historyImportEnabled = history_import_enabled_;

- (id)initWithImporterHost:(ImporterHost*)host
               browserName:(string16)browserName
                  observer:(ImportObserver*)observer
              itemsEnabled:(int16)items; {
  NSString* nib_path =
      [mac_util::MainAppBundle() pathForResource:@"ImportProgressDialog"
                                          ofType:@"nib"];<commit_msg>Mac/clang: Fix warning.<commit_after>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "chrome/browser/cocoa/import_progress_dialog.h"

#include "app/l10n_util_mac.h"
#include "base/logging.h"
#include "base/mac_util.h"
#include "base/message_loop.h"
#import "base/scoped_nsobject.h"
#import "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"

namespace {

// Convert ImportItem enum into the name of the ImportProgressDialogController
// property corresponding to the text for that item, this makes the code to
// change the values for said properties much more readable.
NSString* keyForImportItem(importer::ImportItem item) {
  switch(item) {
    case importer::HISTORY:
      return @"historyStatusText";
    case importer::FAVORITES:
      return @"favoritesStatusText";
    case importer::PASSWORDS:
      return @"savedPasswordStatusText";
    case importer::SEARCH_ENGINES:
      return @"searchStatusText";
    default:
      DCHECK(false);
      break;
  }
  return nil;
}

}  // namespace

@implementation ImportProgressDialogController

@synthesize explanatoryText = explanatory_text_;
@synthesize favoritesStatusText = favorites_status_text_;
@synthesize searchStatusText = search_status_text_;
@synthesize savedPasswordStatusText = saved_password_status_text_;
@synthesize historyStatusText = history_status_text_;

@synthesize favoritesImportEnabled = favorites_import_enabled_;
@synthesize searchImportEnabled = search_import_enabled_;
@synthesize passwordImportEnabled = password_import_enabled_;
@synthesize historyImportEnabled = history_import_enabled_;

- (id)initWithImporterHost:(ImporterHost*)host
               browserName:(string16)browserName
                  observer:(ImportObserver*)observer
              itemsEnabled:(int16)items {
  NSString* nib_path =
      [mac_util::MainAppBundle() pathForResource:@"ImportProgressDialog"
                                          ofType:@"nib"];
{'fraction_non_alphanumeric': 0.08842105263157894, 'fraction_numerical': 0.004678362573099415, 'mean_word_length': 4.604193971166448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6978328', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1185, 'n_words': 291}