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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.h

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up views code Created 5 years, 10 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
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_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/prefs/pref_change_registrar.h" 15 #include "base/prefs/pref_change_registrar.h"
16 #include "base/prefs/pref_member.h" 16 #include "base/prefs/pref_member.h"
17 #include "base/scoped_observer.h" 17 #include "base/scoped_observer.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_info_cache_observer.h"
19 #include "chrome/browser/shell_integration.h" 20 #include "chrome/browser/shell_integration.h"
20 #include "chrome/browser/sync/profile_sync_service_observer.h" 21 #include "chrome/browser/sync/profile_sync_service_observer.h"
21 #include "chrome/browser/ui/host_desktop.h" 22 #include "chrome/browser/ui/host_desktop.h"
22 #include "chrome/browser/ui/webui/options/options_ui.h" 23 #include "chrome/browser/ui/webui/options/options_ui.h"
23 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" 24 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
24 #include "components/policy/core/common/policy_service.h" 25 #include "components/policy/core/common/policy_service.h"
25 #include "components/search_engines/template_url_service_observer.h" 26 #include "components/search_engines/template_url_service_observer.h"
26 #include "components/signin/core/browser/signin_manager_base.h" 27 #include "components/signin/core/browser/signin_manager_base.h"
27 #include "content/public/browser/notification_observer.h" 28 #include "content/public/browser/notification_observer.h"
28 #include "extensions/browser/extension_registry_observer.h" 29 #include "extensions/browser/extension_registry_observer.h"
(...skipping 17 matching lines...) Expand all
46 47
47 namespace policy { 48 namespace policy {
48 class PolicyChangeRegistrar; 49 class PolicyChangeRegistrar;
49 } 50 }
50 51
51 namespace options { 52 namespace options {
52 53
53 // Chrome browser options page UI handler. 54 // Chrome browser options page UI handler.
54 class BrowserOptionsHandler 55 class BrowserOptionsHandler
55 : public OptionsPageUIHandler, 56 : public OptionsPageUIHandler,
57 public ProfileInfoCacheObserver,
56 public ProfileSyncServiceObserver, 58 public ProfileSyncServiceObserver,
57 public SigninManagerBase::Observer, 59 public SigninManagerBase::Observer,
58 public ui::SelectFileDialog::Listener, 60 public ui::SelectFileDialog::Listener,
59 public ShellIntegration::DefaultWebClientObserver, 61 public ShellIntegration::DefaultWebClientObserver,
60 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
61 public chromeos::system::PointerDeviceObserver::Observer, 63 public chromeos::system::PointerDeviceObserver::Observer,
62 public policy::ConsumerManagementService::Observer, 64 public policy::ConsumerManagementService::Observer,
63 #endif 65 #endif
64 public TemplateURLServiceObserver, 66 public TemplateURLServiceObserver,
65 public extensions::ExtensionRegistryObserver, 67 public extensions::ExtensionRegistryObserver,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // policy::PolicyService::Observer: 108 // policy::PolicyService::Observer:
107 void OnPolicyUpdated(const policy::PolicyNamespace& ns, 109 void OnPolicyUpdated(const policy::PolicyNamespace& ns,
108 const policy::PolicyMap& previous, 110 const policy::PolicyMap& previous,
109 const policy::PolicyMap& current) override; 111 const policy::PolicyMap& current) override;
110 private: 112 private:
111 // content::NotificationObserver implementation. 113 // content::NotificationObserver implementation.
112 void Observe(int type, 114 void Observe(int type,
113 const content::NotificationSource& source, 115 const content::NotificationSource& source,
114 const content::NotificationDetails& details) override; 116 const content::NotificationDetails& details) override;
115 117
118 // ProfileInfoCacheObserver implementation.
119 void OnProfileAdded(const base::FilePath& profile_path) override;
120 void OnProfileWasRemoved(const base::FilePath& profile_path,
121 const base::string16& profile_name) override;
122 void OnProfileNameChanged(const base::FilePath& profile_path,
123 const base::string16& old_profile_name) override;
124 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
125
116 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OS_CHROMEOS) 126 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OS_CHROMEOS)
117 void OnCloudPrintPrefsChanged(); 127 void OnCloudPrintPrefsChanged();
118 #endif 128 #endif
119 129
120 // SelectFileDialog::Listener implementation 130 // SelectFileDialog::Listener implementation
121 void FileSelected(const base::FilePath& path, 131 void FileSelected(const base::FilePath& path,
122 int index, 132 int index,
123 void* params) override; 133 void* params) override;
124 134
125 #if defined(OS_CHROMEOS) 135 #if defined(OS_CHROMEOS)
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 414
405 // Used to get WeakPtr to self for use on the UI thread. 415 // Used to get WeakPtr to self for use on the UI thread.
406 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; 416 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_;
407 417
408 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); 418 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler);
409 }; 419 };
410 420
411 } // namespace options 421 } // namespace options
412 422
413 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 423 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698