| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/callback.h" | 10 #include "base/callback.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (args->GetString(4, &string_value) && string_value == "true") { | 89 if (args->GetString(4, &string_value) && string_value == "true") { |
| 90 selected_items |= importer::SEARCH_ENGINES; | 90 selected_items |= importer::SEARCH_ENGINES; |
| 91 } | 91 } |
| 92 | 92 |
| 93 const importer::SourceProfile& source_profile = | 93 const importer::SourceProfile& source_profile = |
| 94 importer_list_->GetSourceProfileAt(browser_index); | 94 importer_list_->GetSourceProfileAt(browser_index); |
| 95 uint16 supported_items = source_profile.services_supported; | 95 uint16 supported_items = source_profile.services_supported; |
| 96 | 96 |
| 97 uint16 import_services = (selected_items & supported_items); | 97 uint16 import_services = (selected_items & supported_items); |
| 98 if (import_services) { | 98 if (import_services) { |
| 99 FundamentalValue state(true); | 99 base::FundamentalValue state(true); |
| 100 web_ui_->CallJavascriptFunction("ImportDataOverlay.setImportingState", | 100 web_ui_->CallJavascriptFunction("ImportDataOverlay.setImportingState", |
| 101 state); | 101 state); |
| 102 | 102 |
| 103 // TODO(csilv): Out-of-process import has only been qualified on MacOS X, | 103 // TODO(csilv): Out-of-process import has only been qualified on MacOS X, |
| 104 // so we will only use it on that platform since it is required. Remove this | 104 // so we will only use it on that platform since it is required. Remove this |
| 105 // conditional logic once oop import is qualified for Linux/Windows. | 105 // conditional logic once oop import is qualified for Linux/Windows. |
| 106 // http://crbug.com/22142 | 106 // http://crbug.com/22142 |
| 107 #if defined(OS_MACOSX) | 107 #if defined(OS_MACOSX) |
| 108 importer_host_ = new ExternalProcessImporterHost; | 108 importer_host_ = new ExternalProcessImporterHost; |
| 109 #else | 109 #else |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void ImportDataHandler::ImportItemEnded(importer::ImportItem item) { | 156 void ImportDataHandler::ImportItemEnded(importer::ImportItem item) { |
| 157 // TODO(csilv): show progress detail in the web view. | 157 // TODO(csilv): show progress detail in the web view. |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ImportDataHandler::ImportEnded() { | 160 void ImportDataHandler::ImportEnded() { |
| 161 importer_host_->SetObserver(NULL); | 161 importer_host_->SetObserver(NULL); |
| 162 importer_host_ = NULL; | 162 importer_host_ = NULL; |
| 163 | 163 |
| 164 web_ui_->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); | 164 web_ui_->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); |
| 165 } | 165 } |
| OLD | NEW |