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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 2762173003: Remove IsNewProfileManagement and EnableNewProfileManagementForTesting (Closed)
Patch Set: Fix compile (add back an include) Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac_browsertest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "chrome/common/pref_names.h" 82 #include "chrome/common/pref_names.h"
83 #include "chrome/common/url_constants.h" 83 #include "chrome/common/url_constants.h"
84 #include "chrome/grit/chromium_strings.h" 84 #include "chrome/grit/chromium_strings.h"
85 #include "chrome/grit/generated_resources.h" 85 #include "chrome/grit/generated_resources.h"
86 #include "components/browser_sync/profile_sync_service.h" 86 #include "components/browser_sync/profile_sync_service.h"
87 #include "components/handoff/handoff_manager.h" 87 #include "components/handoff/handoff_manager.h"
88 #include "components/handoff/handoff_utility.h" 88 #include "components/handoff/handoff_utility.h"
89 #include "components/prefs/pref_service.h" 89 #include "components/prefs/pref_service.h"
90 #include "components/sessions/core/tab_restore_service.h" 90 #include "components/sessions/core/tab_restore_service.h"
91 #include "components/signin/core/browser/signin_manager.h" 91 #include "components/signin/core/browser/signin_manager.h"
92 #include "components/signin/core/common/profile_management_switches.h"
93 #include "content/public/browser/browser_thread.h" 92 #include "content/public/browser/browser_thread.h"
94 #include "content/public/browser/download_manager.h" 93 #include "content/public/browser/download_manager.h"
95 #include "content/public/browser/notification_service.h" 94 #include "content/public/browser/notification_service.h"
96 #include "content/public/browser/notification_types.h" 95 #include "content/public/browser/notification_types.h"
97 #include "content/public/browser/plugin_service.h" 96 #include "content/public/browser/plugin_service.h"
98 #include "content/public/browser/user_metrics.h" 97 #include "content/public/browser/user_metrics.h"
99 #include "extensions/browser/extension_registry.h" 98 #include "extensions/browser/extension_registry.h"
100 #include "extensions/browser/extension_system.h" 99 #include "extensions/browser/extension_system.h"
101 #include "net/base/filename_util.h" 100 #include "net/base/filename_util.h"
102 #include "ui/base/cocoa/focus_window_set.h" 101 #include "ui/base/cocoa/focus_window_set.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 base::FilePath app_bundle_path = 175 base::FilePath app_bundle_path =
177 chrome::GetVersionedDirectory().DirName().DirName().DirName(); 176 chrome::GetVersionedDirectory().DirName().DirName().DirName();
178 base::ScopedCFTypeRef<CFStringRef> app_bundle_path_cfstring( 177 base::ScopedCFTypeRef<CFStringRef> app_bundle_path_cfstring(
179 base::SysUTF8ToCFStringRef(app_bundle_path.value())); 178 base::SysUTF8ToCFStringRef(app_bundle_path.value()));
180 CFPreferencesSetAppValue( 179 CFPreferencesSetAppValue(
181 base::mac::NSToCFCast(app_mode::kLastRunAppBundlePathPrefsKey), 180 base::mac::NSToCFCast(app_mode::kLastRunAppBundlePathPrefsKey),
182 app_bundle_path_cfstring, BaseBundleID_CFString()); 181 app_bundle_path_cfstring, BaseBundleID_CFString());
183 } 182 }
184 183
185 bool IsProfileSignedOut(Profile* profile) { 184 bool IsProfileSignedOut(Profile* profile) {
186 // The signed out status only makes sense at the moment in the context of the
187 // --new-profile-management flag.
188 if (!switches::IsNewProfileManagement())
189 return false;
190 ProfileAttributesEntry* entry; 185 ProfileAttributesEntry* entry;
191 bool has_entry = 186 bool has_entry =
192 g_browser_process->profile_manager()->GetProfileAttributesStorage(). 187 g_browser_process->profile_manager()->GetProfileAttributesStorage().
193 GetProfileAttributesWithPath(profile->GetPath(), &entry); 188 GetProfileAttributesWithPath(profile->GetPath(), &entry);
194 return has_entry && entry->IsSigninRequired(); 189 return has_entry && entry->IsSigninRequired();
195 } 190 }
196 191
197 } // namespace 192 } // namespace
198 193
199 @interface AppController () <HandoffActiveURLObserverBridgeDelegate> 194 @interface AppController () <HandoffActiveURLObserverBridgeDelegate>
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 1602
1608 //--------------------------------------------------------------------------- 1603 //---------------------------------------------------------------------------
1609 1604
1610 namespace app_controller_mac { 1605 namespace app_controller_mac {
1611 1606
1612 bool IsOpeningNewWindow() { 1607 bool IsOpeningNewWindow() {
1613 return g_is_opening_new_window; 1608 return g_is_opening_new_window;
1614 } 1609 }
1615 1610
1616 } // namespace app_controller_mac 1611 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698