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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 6930033: Replace GetStarted component extension with URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/profiles/profile_impl.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chromeos/boot_times_loader.h" 13 #include "chrome/browser/chromeos/boot_times_loader.h"
13 #include "chrome/browser/chromeos/cros/cros_library.h" 14 #include "chrome/browser/chromeos/cros/cros_library.h"
14 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 15 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
15 #include "chrome/browser/chromeos/cros/login_library.h" 16 #include "chrome/browser/chromeos/cros/login_library.h"
16 #include "chrome/browser/chromeos/cros/network_library.h" 17 #include "chrome/browser/chromeos/cros/network_library.h"
17 #include "chrome/browser/chromeos/customization_document.h" 18 #include "chrome/browser/chromeos/customization_document.h"
18 #include "chrome/browser/chromeos/login/helper.h" 19 #include "chrome/browser/chromeos/login/helper.h"
(...skipping 17 matching lines...) Expand all
36 #include "views/window/window.h" 37 #include "views/window/window.h"
37 38
38 namespace chromeos { 39 namespace chromeos {
39 40
40 namespace { 41 namespace {
41 42
42 // Url for setting up sync authentication. 43 // Url for setting up sync authentication.
43 const char kSettingsSyncLoginURL[] = "chrome://settings/personal"; 44 const char kSettingsSyncLoginURL[] = "chrome://settings/personal";
44 45
45 // URL that will be opened on when user logs in first time on the device. 46 // URL that will be opened on when user logs in first time on the device.
46 const char kGetStartedURL[] = 47 const char kGetStartedURLPattern[] =
47 "chrome-extension://cbmhffdpiobpchciemffincgahkkljig/index.html"; 48 "http://services.google.com/chromeos/gettingstarted/index-%s.html";
48 49
49 // URL for account creation. 50 // URL for account creation.
50 const char kCreateAccountURL[] = 51 const char kCreateAccountURL[] =
51 "https://www.google.com/accounts/NewAccount?service=mail"; 52 "https://www.google.com/accounts/NewAccount?service=mail";
52 53
53 // Landing URL when launching Guest mode to fix captive portal. 54 // Landing URL when launching Guest mode to fix captive portal.
54 const char kCaptivePortalLaunchURL[] = "http://www.google.com/"; 55 const char kCaptivePortalLaunchURL[] = "http://www.google.com/";
55 56
56 } // namespace 57 } // namespace
57 58
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 password, 325 password,
325 credentials, 326 credentials,
326 pending_requests, 327 pending_requests,
327 this); 328 this);
328 329
329 } 330 }
330 331
331 void ExistingUserController::OnProfilePrepared(Profile* profile) { 332 void ExistingUserController::OnProfilePrepared(Profile* profile) {
332 // TODO(nkostylev): May add login UI implementation callback call. 333 // TODO(nkostylev): May add login UI implementation callback call.
333 if (!ready_for_browser_launch_) { 334 if (!ready_for_browser_launch_) {
334 #if defined(OFFICIAL_BUILD) 335 PrefService* prefs = g_browser_process->local_state();
335 CommandLine::ForCurrentProcess()->AppendArg(kGetStartedURL); 336 const std::string current_locale =
336 #endif // OFFICIAL_BUILD 337 prefs->GetString(prefs::kApplicationLocale);
338 std::string start_url =
Nikita (slow) 2011/05/11 10:22:24 As discussed, add conversion to lower case.
Dmitry Polukhin 2011/05/11 10:27:19 Done. I did it some time ago but forgot to upload
339 base::StringPrintf(kGetStartedURLPattern, current_locale.c_str());
340 CommandLine::ForCurrentProcess()->AppendArg(start_url);
337 341
338 ServicesCustomizationDocument* customization = 342 ServicesCustomizationDocument* customization =
339 ServicesCustomizationDocument::GetInstance(); 343 ServicesCustomizationDocument::GetInstance();
340 if (customization->IsReady()) { 344 if (customization->IsReady()) {
341 std::string locale = g_browser_process->GetApplicationLocale(); 345 std::string locale = g_browser_process->GetApplicationLocale();
342 std::string initial_start_page = 346 std::string initial_start_page =
343 customization->GetInitialStartPage(locale); 347 customization->GetInitialStartPage(locale);
344 if (!initial_start_page.empty()) 348 if (!initial_start_page.empty())
345 CommandLine::ForCurrentProcess()->AppendArg(initial_start_page); 349 CommandLine::ForCurrentProcess()->AppendArg(initial_start_page);
346 customization->ApplyCustomization(); 350 customization->ApplyCustomization();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 491 }
488 if (CrosLibrary::Get()->EnsureLoaded()) { 492 if (CrosLibrary::Get()->EnsureLoaded()) {
489 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); 493 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary();
490 cryptohomed->AsyncSetOwnerUser( 494 cryptohomed->AsyncSetOwnerUser(
491 UserCrosSettingsProvider::cached_owner(), NULL); 495 UserCrosSettingsProvider::cached_owner(), NULL);
492 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); 496 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL);
493 } 497 }
494 } 498 }
495 499
496 } // namespace chromeos 500 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698