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 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "grit/chromium_strings.h" | 41 #include "grit/chromium_strings.h" |
42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
43 #include "grit/theme_resources.h" | 43 #include "grit/theme_resources.h" |
44 #include "net/cookies/cookie_monster.h" | 44 #include "net/cookies/cookie_monster.h" |
45 #include "net/url_request/url_request.h" | 45 #include "net/url_request/url_request.h" |
46 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
47 #include "ui/base/resource/resource_bundle.h" | 47 #include "ui/base/resource/resource_bundle.h" |
48 #include "webkit/forms/password_form.h" | 48 #include "webkit/forms/password_form.h" |
49 #include "webkit/forms/password_form_dom_manager.h" | 49 #include "webkit/forms/password_form_dom_manager.h" |
50 | 50 |
51 int OneClickSigninHelper::kUserDataKey; | 51 DEFINE_WEB_CONTENTS_USER_DATA_KEY(OneClickSigninHelper) |
52 | 52 |
53 namespace { | 53 namespace { |
54 | 54 |
55 // Set to true if this chrome instance is in the blue-button-on-white-bar | 55 // Set to true if this chrome instance is in the blue-button-on-white-bar |
56 // experimental group. | 56 // experimental group. |
57 bool use_blue_on_white = false; | 57 bool use_blue_on_white = false; |
58 | 58 |
59 // Start syncing with the given user information. | 59 // Start syncing with the given user information. |
60 void StartSync(content::WebContents* web_contents, | 60 void StartSync(content::WebContents* web_contents, |
61 const std::string& session_index, | 61 const std::string& session_index, |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 session_index_ = session_index; | 418 session_index_ = session_index; |
419 email_ = email; | 419 email_ = email; |
420 } | 420 } |
421 | 421 |
422 void OneClickSigninHelper::SavePassword(const std::string& password) { | 422 void OneClickSigninHelper::SavePassword(const std::string& password) { |
423 // TODO(rogerta): in the case of a 2-factor or captcha or some other type of | 423 // TODO(rogerta): in the case of a 2-factor or captcha or some other type of |
424 // challenge, its possible for the user to never complete the signin. | 424 // challenge, its possible for the user to never complete the signin. |
425 // Should have a way to detect this and clear the password member. | 425 // Should have a way to detect this and clear the password member. |
426 password_ = password; | 426 password_ = password; |
427 } | 427 } |
OLD | NEW |