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