Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/browser/importer/importer_list.cc

Issue 10830098: Get the Firefox branding name dynamically (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/importer/importer_list.h" 5 #include "chrome/browser/importer/importer_list.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/first_run/first_run.h" 8 #include "chrome/browser/first_run/first_run.h"
9 #include "chrome/browser/importer/firefox_importer_utils.h" 9 #include "chrome/browser/importer/firefox_importer_utils.h"
10 #include "chrome/browser/importer/importer_bridge.h" 10 #include "chrome/browser/importer/importer_bridge.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 version = GetCurrentFirefoxMajorVersionFromRegistry(); 68 version = GetCurrentFirefoxMajorVersionFromRegistry();
69 #endif 69 #endif
70 if (version < 2) 70 if (version < 2)
71 GetFirefoxVersionAndPathFromProfile(profile_path, &version, &app_path); 71 GetFirefoxVersionAndPathFromProfile(profile_path, &version, &app_path);
72 72
73 if (version == 2) { 73 if (version == 2) {
74 firefox_type = importer::TYPE_FIREFOX2; 74 firefox_type = importer::TYPE_FIREFOX2;
75 } else if (version >= 3) { 75 } else if (version >= 3) {
76 firefox_type = importer::TYPE_FIREFOX3; 76 firefox_type = importer::TYPE_FIREFOX3;
77 } else { 77 } else {
78 // Ignores other versions of firefox.
79 return; 78 return;
80 } 79 }
Ilya Sherman 2012/08/07 21:52:21 nit: If you're removing the comment from the final
cristian.patrasciuc 2012/08/08 15:20:52 Done.
81 80
82 importer::SourceProfile* firefox = new importer::SourceProfile; 81 importer::SourceProfile* firefox = new importer::SourceProfile;
83 firefox->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_FIREFOX); 82 firefox->importer_name = GetFirefoxImporterName(app_path);
84 firefox->importer_type = firefox_type; 83 firefox->importer_type = firefox_type;
85 firefox->source_path = profile_path; 84 firefox->source_path = profile_path;
86 #if defined(OS_WIN) 85 #if defined(OS_WIN)
87 firefox->app_path = GetFirefoxInstallPathFromRegistry(); 86 firefox->app_path = GetFirefoxInstallPathFromRegistry();
88 #endif 87 #endif
89 if (firefox->app_path.empty()) 88 if (firefox->app_path.empty())
90 firefox->app_path = app_path; 89 firefox->app_path = app_path;
91 firefox->services_supported = importer::HISTORY | importer::FAVORITES | 90 firefox->services_supported = importer::HISTORY | importer::FAVORITES |
92 importer::PASSWORDS | importer::SEARCH_ENGINES; 91 importer::PASSWORDS | importer::SEARCH_ENGINES;
93 profiles->push_back(firefox); 92 profiles->push_back(firefox);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 source_profiles_.assign(profiles.begin(), profiles.end()); 223 source_profiles_.assign(profiles.begin(), profiles.end());
225 source_profiles_loaded_ = true; 224 source_profiles_loaded_ = true;
226 source_thread_id_ = BrowserThread::UI; 225 source_thread_id_ = BrowserThread::UI;
227 226
228 observer_->OnSourceProfilesLoaded(); 227 observer_->OnSourceProfilesLoaded();
229 observer_ = NULL; 228 observer_ = NULL;
230 229
231 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. 230 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed.
232 is_observed_ = false; 231 is_observed_ = false;
233 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698