| 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 // This class keeps track of the currently-active profiles in the runtime. | 5 // This class keeps track of the currently-active profiles in the runtime. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <list> | 11 #include <list> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/hash_tables.h" | 17 #include "base/hash_tables.h" |
| 18 #include "base/memory/linked_ptr.h" | 18 #include "base/memory/linked_ptr.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/message_loop.h" | 20 #include "base/message_loop.h" |
| 21 #include "base/threading/non_thread_safe.h" | 21 #include "base/threading/non_thread_safe.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/ui/browser_list.h" | 23 #include "chrome/browser/ui/browser_list_observer.h" |
| 24 #include "chrome/browser/ui/startup/startup_types.h" | 24 #include "chrome/browser/ui/startup/startup_types.h" |
| 25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
| 26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
| 27 | 27 |
| 28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 29 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" | 29 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 class NewProfileLauncher; | 32 class NewProfileLauncher; |
| 33 class ProfileInfoCache; | 33 class ProfileInfoCache; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // if it has not been explicitly deleted. | 309 // if it has not been explicitly deleted. |
| 310 scoped_ptr<ProfileInfoCache> profile_info_cache_; | 310 scoped_ptr<ProfileInfoCache> profile_info_cache_; |
| 311 | 311 |
| 312 #if defined(OS_WIN) | 312 #if defined(OS_WIN) |
| 313 // Manages the creation, deletion, and renaming of Windows shortcuts by | 313 // Manages the creation, deletion, and renaming of Windows shortcuts by |
| 314 // observing the ProfileInfoCache. | 314 // observing the ProfileInfoCache. |
| 315 scoped_ptr<ProfileShortcutManagerWin> profile_shortcut_manager_; | 315 scoped_ptr<ProfileShortcutManagerWin> profile_shortcut_manager_; |
| 316 #endif | 316 #endif |
| 317 | 317 |
| 318 #if !defined(OS_ANDROID) | 318 #if !defined(OS_ANDROID) |
| 319 class BrowserListObserver : public BrowserList::Observer { | 319 class BrowserListObserver : public chrome::BrowserListObserver { |
| 320 public: | 320 public: |
| 321 explicit BrowserListObserver(ProfileManager* manager); | 321 explicit BrowserListObserver(ProfileManager* manager); |
| 322 virtual ~BrowserListObserver(); | 322 virtual ~BrowserListObserver(); |
| 323 | 323 |
| 324 // BrowserList::Observer implementation. | 324 // chrome::BrowserListObserver implementation. |
| 325 virtual void OnBrowserAdded(Browser* browser) OVERRIDE; | 325 virtual void OnBrowserAdded(Browser* browser) OVERRIDE; |
| 326 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; | 326 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; |
| 327 virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE; | 327 virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE; |
| 328 | 328 |
| 329 private: | 329 private: |
| 330 ProfileManager* profile_manager_; | 330 ProfileManager* profile_manager_; |
| 331 DISALLOW_COPY_AND_ASSIGN(BrowserListObserver); | 331 DISALLOW_COPY_AND_ASSIGN(BrowserListObserver); |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 BrowserListObserver browser_list_observer_; | 334 BrowserListObserver browser_list_observer_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 349 class ProfileManagerWithoutInit : public ProfileManager { | 349 class ProfileManagerWithoutInit : public ProfileManager { |
| 350 public: | 350 public: |
| 351 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 351 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
| 352 | 352 |
| 353 protected: | 353 protected: |
| 354 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 354 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
| 355 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 355 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 358 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |