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/network_profile_bubble_view.h" | 5 #include "chrome/browser/ui/views/network_profile_bubble_view.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | |
8 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/network_profile_bubble.h" | 9 #include "chrome/browser/ui/network_profile_bubble.h" |
11 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
12 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" | 11 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" |
13 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 12 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
15 #include "chrome/grit/chromium_strings.h" | 14 #include "chrome/grit/chromium_strings.h" |
16 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "grit/components_strings.h" | 17 #include "grit/components_strings.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/views/controls/button/label_button.h" | 19 #include "ui/views/controls/button/label_button.h" |
20 #include "ui/views/controls/label.h" | 20 #include "ui/views/controls/label.h" |
21 #include "ui/views/controls/link.h" | 21 #include "ui/views/controls/link.h" |
22 #include "ui/views/layout/grid_layout.h" | 22 #include "ui/views/layout/grid_layout.h" |
23 #include "ui/views/layout/layout_constants.h" | 23 #include "ui/views/layout/layout_constants.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ui::PAGE_TRANSITION_LINK, false); | 135 ui::PAGE_TRANSITION_LINK, false); |
136 navigator_->OpenURL(params); | 136 navigator_->OpenURL(params); |
137 | 137 |
138 // If the user interacted with the bubble we don't reduce the number of | 138 // If the user interacted with the bubble we don't reduce the number of |
139 // warnings left. | 139 // warnings left. |
140 PrefService* prefs = profile_->GetPrefs(); | 140 PrefService* prefs = profile_->GetPrefs(); |
141 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft); | 141 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft); |
142 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings); | 142 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings); |
143 GetWidget()->Close(); | 143 GetWidget()->Close(); |
144 } | 144 } |
OLD | NEW |