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

Side by Side Diff: chrome/browser/ui/app_list/chrome_signin_delegate.cc

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove junk from list_model.h Created 7 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_list/chrome_signin_delegate.h" 5 #include "chrome/browser/ui/app_list/chrome_signin_delegate.h"
6 6
7 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/signin/signin_manager.h" 11 #include "chrome/browser/signin/signin_manager.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 12 #include "chrome/browser/signin/signin_manager_factory.h"
11 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/browser_navigator.h" 14 #include "chrome/browser/ui/browser_navigator.h"
13 #include "chrome/browser/ui/chrome_pages.h" 15 #include "chrome/browser/ui/chrome_pages.h"
14 #include "chrome/browser/ui/extensions/application_launch.h" 16 #include "chrome/browser/ui/extensions/application_launch.h"
15 #include "chrome/browser/ui/host_desktop.h" 17 #include "chrome/browser/ui/host_desktop.h"
16 #include "chrome/browser/ui/sync/sync_promo_ui.h" 18 #include "chrome/browser/ui/sync/sync_promo_ui.h"
17 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/common/extensions/extension_constants.h"
18 #include "content/public/common/page_transition_types.h" 20 #include "content/public/common/page_transition_types.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 string16 ChromeSigninDelegate::GetLearnMoreLinkText() { 95 string16 ChromeSigninDelegate::GetLearnMoreLinkText() {
94 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 96 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
95 return rb.GetLocalizedString(IDS_APP_LIST_SIGNIN_LEARN_MORE_TEXT); 97 return rb.GetLocalizedString(IDS_APP_LIST_SIGNIN_LEARN_MORE_TEXT);
96 } 98 }
97 99
98 string16 ChromeSigninDelegate::GetSettingsLinkText() { 100 string16 ChromeSigninDelegate::GetSettingsLinkText() {
99 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 101 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
100 return rb.GetLocalizedString(IDS_APP_LIST_SIGNIN_SETTINGS_TEXT); 102 return rb.GetLocalizedString(IDS_APP_LIST_SIGNIN_SETTINGS_TEXT);
101 } 103 }
102 104
105 void ChromeSigninDelegate::SetProfileByPath(
106 const base::FilePath& profile_path) {
107 // The profile must be loaded before this is called.
108 profile_ =
109 g_browser_process->profile_manager()->GetProfileByPath(profile_path);
110 DCHECK(profile_);
111 }
112
103 ChromeSigninDelegate::~ChromeSigninDelegate() {} 113 ChromeSigninDelegate::~ChromeSigninDelegate() {}
104 114
105 void ChromeSigninDelegate::SigninFailed(const GoogleServiceAuthError& error) {} 115 void ChromeSigninDelegate::SigninFailed(const GoogleServiceAuthError& error) {}
106 116
107 void ChromeSigninDelegate::SigninSuccess() { 117 void ChromeSigninDelegate::SigninSuccess() {
108 NotifySigninSuccess(); 118 NotifySigninSuccess();
109 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698