| 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/views/home_button.h" | 5 #include "chrome/browser/ui/views/toolbar/home_button.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 #include "components/user_prefs/user_prefs.h" | 11 #include "components/user_prefs/user_prefs.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
| 14 #include "ui/views/bubble/bubble_delegate.h" | 14 #include "ui/views/bubble/bubble_delegate.h" |
| 15 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool old_is_ntp = prefs->GetBoolean(prefs::kHomePageIsNewTabPage); | 171 bool old_is_ntp = prefs->GetBoolean(prefs::kHomePageIsNewTabPage); |
| 172 GURL old_homepage(prefs->GetString(prefs::kHomePage)); | 172 GURL old_homepage(prefs->GetString(prefs::kHomePage)); |
| 173 | 173 |
| 174 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); | 174 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); |
| 175 prefs->SetString(prefs::kHomePage, new_homepage_url.spec()); | 175 prefs->SetString(prefs::kHomePage, new_homepage_url.spec()); |
| 176 | 176 |
| 177 HomePageUndoBubble::ShowBubble(browser_, old_is_ntp, old_homepage, this); | 177 HomePageUndoBubble::ShowBubble(browser_, old_is_ntp, old_homepage, this); |
| 178 } | 178 } |
| 179 return ui::DragDropTypes::DRAG_NONE; | 179 return ui::DragDropTypes::DRAG_NONE; |
| 180 } | 180 } |
| OLD | NEW |