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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 ImportAutofillDataWin(profile_->GetPersonalDataManager()); | 513 ImportAutofillDataWin(profile_->GetPersonalDataManager()); |
514 #endif // defined(OS_WIN) | 514 #endif // defined(OS_WIN) |
515 // Reset the preference so we don't call it again for subsequent windows. | 515 // Reset the preference so we don't call it again for subsequent windows. |
516 local_state->ClearPref(prefs::kAutofillPersonalDataManagerFirstRun); | 516 local_state->ClearPref(prefs::kAutofillPersonalDataManagerFirstRun); |
517 } | 517 } |
518 } | 518 } |
519 | 519 |
520 /////////////////////////////////////////////////////////////////////////////// | 520 /////////////////////////////////////////////////////////////////////////////// |
521 // Getters & Setters | 521 // Getters & Setters |
522 | 522 |
523 const std::vector<std::wstring>& Browser::user_data_dir_profiles() const { | |
524 return g_browser_process->user_data_dir_profiles(); | |
525 } | |
526 | |
527 void Browser::set_user_data_dir_profiles( | |
528 const std::vector<std::wstring>& profiles) { | |
529 g_browser_process->user_data_dir_profiles() = profiles; | |
530 } | |
531 | |
532 FindBarController* Browser::GetFindBarController() { | 523 FindBarController* Browser::GetFindBarController() { |
533 if (!find_bar_controller_.get()) { | 524 if (!find_bar_controller_.get()) { |
534 FindBar* find_bar = window_->CreateFindBar(); | 525 FindBar* find_bar = window_->CreateFindBar(); |
535 find_bar_controller_.reset(new FindBarController(find_bar)); | 526 find_bar_controller_.reset(new FindBarController(find_bar)); |
536 find_bar->SetFindBarController(find_bar_controller_.get()); | 527 find_bar->SetFindBarController(find_bar_controller_.get()); |
537 find_bar_controller_->ChangeTabContents(GetSelectedTabContentsWrapper()); | 528 find_bar_controller_->ChangeTabContents(GetSelectedTabContentsWrapper()); |
538 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); | 529 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); |
539 } | 530 } |
540 return find_bar_controller_.get(); | 531 return find_bar_controller_.get(); |
541 } | 532 } |
(...skipping 4303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4845 } | 4836 } |
4846 | 4837 |
4847 void Browser::ShowSyncSetup() { | 4838 void Browser::ShowSyncSetup() { |
4848 ProfileSyncService* service = | 4839 ProfileSyncService* service = |
4849 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4840 profile()->GetOriginalProfile()->GetProfileSyncService(); |
4850 if (service->HasSyncSetupCompleted()) | 4841 if (service->HasSyncSetupCompleted()) |
4851 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4842 ShowOptionsTab(chrome::kSyncSetupSubPage); |
4852 else | 4843 else |
4853 service->ShowLoginDialog(); | 4844 service->ShowLoginDialog(); |
4854 } | 4845 } |
OLD | NEW |