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

Side by Side Diff: chrome/browser/ui/network_profile_bubble.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 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 #ifndef CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_
6 #define CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_ 6 #define CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 class Browser; 10 class Browser;
11 class FilePath; 11 class FilePath;
12 class PrefService; 12 class PrefServiceSyncable;
13 class Profile; 13 class Profile;
14 14
15 // This class will try to detect if the profile is on a network share and if 15 // This class will try to detect if the profile is on a network share and if
16 // this is the case notify the user with an info bubble. 16 // this is the case notify the user with an info bubble.
17 class NetworkProfileBubble { 17 class NetworkProfileBubble {
18 public: 18 public:
19 enum MetricNetworkedProfileCheck { 19 enum MetricNetworkedProfileCheck {
20 // Check was suppressed by command line flag. 20 // Check was suppressed by command line flag.
21 METRIC_CHECK_SUPPRESSED, 21 METRIC_CHECK_SUPPRESSED,
22 // WTSQuerySessionInformation call failed. 22 // WTSQuerySessionInformation call failed.
(...skipping 25 matching lines...) Expand all
48 // Verifies that the profile folder is not located on a network share, and if 48 // Verifies that the profile folder is not located on a network share, and if
49 // it is shows the warning bubble to the user. 49 // it is shows the warning bubble to the user.
50 static void CheckNetworkProfile(const FilePath& profile_folder); 50 static void CheckNetworkProfile(const FilePath& profile_folder);
51 51
52 // Shows the notification bubble using the provided |browser|. 52 // Shows the notification bubble using the provided |browser|.
53 static void ShowNotification(Browser* browser); 53 static void ShowNotification(Browser* browser);
54 54
55 static void SetNotificationShown(bool shown); 55 static void SetNotificationShown(bool shown);
56 56
57 // Register the pref that controls whether the bubble should be shown anymore. 57 // Register the pref that controls whether the bubble should be shown anymore.
58 static void RegisterPrefs(PrefService* prefs); 58 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
59 59
60 // Helper function wrapping the UMA_HISTOGRAM_ENUMERATION macro. 60 // Helper function wrapping the UMA_HISTOGRAM_ENUMERATION macro.
61 static void RecordUmaEvent(MetricNetworkedProfileCheck event); 61 static void RecordUmaEvent(MetricNetworkedProfileCheck event);
62 62
63 private: 63 private:
64 // This function creates the notification bubble, attaches it to the 64 // This function creates the notification bubble, attaches it to the
65 // |anchor| View and then shows it to the user. 65 // |anchor| View and then shows it to the user.
66 static void NotifyNetworkProfileDetected(); 66 static void NotifyNetworkProfileDetected();
67 67
68 // Set to true once the notification check has been performed to avoid showing 68 // Set to true once the notification check has been performed to avoid showing
69 // the notification more than once per browser run. 69 // the notification more than once per browser run.
70 // This flag is not thread-safe and should only be accessed on the UI thread! 70 // This flag is not thread-safe and should only be accessed on the UI thread!
71 static bool notification_shown_; 71 static bool notification_shown_;
72 72
73 DISALLOW_IMPLICIT_CONSTRUCTORS(NetworkProfileBubble); 73 DISALLOW_IMPLICIT_CONSTRUCTORS(NetworkProfileBubble);
74 }; 74 };
75 75
76 #endif // CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_ 76 #endif // CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/network_profile_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698