| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options/import_data_handler.h" | 5 #include "chrome/browser/ui/webui/options/import_data_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 | 29 |
| 30 namespace options { | 30 namespace options { |
| 31 | 31 |
| 32 ImportDataHandler::ImportDataHandler() : importer_host_(NULL), | 32 ImportDataHandler::ImportDataHandler() : importer_host_(NULL), |
| 33 import_did_succeed_(false) { | 33 import_did_succeed_(false) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 ImportDataHandler::~ImportDataHandler() { | 36 ImportDataHandler::~ImportDataHandler() { |
| 37 if (importer_list_) | 37 if (importer_list_.get()) |
| 38 importer_list_->SetObserver(NULL); | 38 importer_list_->SetObserver(NULL); |
| 39 | 39 |
| 40 if (importer_host_) | 40 if (importer_host_) |
| 41 importer_host_->SetObserver(NULL); | 41 importer_host_->SetObserver(NULL); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void ImportDataHandler::GetLocalizedValues(DictionaryValue* localized_strings) { | 44 void ImportDataHandler::GetLocalizedValues(DictionaryValue* localized_strings) { |
| 45 DCHECK(localized_strings); | 45 DCHECK(localized_strings); |
| 46 | 46 |
| 47 static OptionsStringResource resources[] = { | 47 static OptionsStringResource resources[] = { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); | 191 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); |
| 192 } else { | 192 } else { |
| 193 base::FundamentalValue state(false); | 193 base::FundamentalValue state(false); |
| 194 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", | 194 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", |
| 195 state); | 195 state); |
| 196 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); | 196 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace options | 200 } // namespace options |
| OLD | NEW |