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

Side by Side Diff: chrome/browser/sync/personalization.cc

Issue 165257: Build browser/sync files by default using a stubbed-out syncapi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifdef CHROME_PERSONALIZATION 5 #ifdef CHROME_PERSONALIZATION
6 6
7 #include "chrome/browser/sync/personalization.h" 7 #include "chrome/browser/sync/personalization.h"
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return L"INVALID_GAIA_CREDENTIALS"; 72 return L"INVALID_GAIA_CREDENTIALS";
73 case AUTH_ERROR_USER_NOT_SIGNED_UP: 73 case AUTH_ERROR_USER_NOT_SIGNED_UP:
74 return L"USER_NOT_SIGNED_UP"; 74 return L"USER_NOT_SIGNED_UP";
75 case AUTH_ERROR_CONNECTION_FAILED: 75 case AUTH_ERROR_CONNECTION_FAILED:
76 return L"CONNECTION_FAILED"; 76 return L"CONNECTION_FAILED";
77 default: 77 default:
78 return std::wstring(); 78 return std::wstring();
79 } 79 }
80 } 80 }
81 81
82 bool IsP13NDisabled(Profile* profile) { 82 bool IsSyncEnabled(Profile* profile) {
83 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 83 const CommandLine* command_line = CommandLine::ForCurrentProcess();
84 if (command_line->HasSwitch(switches::kDisableP13n)) 84 if (!command_line->HasSwitch(switches::kEnableSync))
85 return true; 85 return false;
86 return !profile || profile->GetProfilePersonalization() == NULL; 86 return profile && profile->GetProfilePersonalization() != NULL;
87 } 87 }
88 88
89 bool NeedsDOMUI(const GURL& url) { 89 bool NeedsDOMUI(const GURL& url) {
90 return url.SchemeIs(kPersonalizationScheme) && 90 return url.SchemeIs(kPersonalizationScheme) &&
91 (url.path().find(kCloudyGaiaLoginPath) != std::string::npos) || 91 (url.path().find(kCloudyGaiaLoginPath) != std::string::npos) ||
92 (url.path().find(kCloudySetupFlowPath) != std::string::npos) || 92 (url.path().find(kCloudySetupFlowPath) != std::string::npos) ||
93 (url.path().find(kCloudyMergeAndSyncPath) != std::string::npos); 93 (url.path().find(kCloudyMergeAndSyncPath) != std::string::npos);
94 } 94 }
95 95
96 class CloudyResourceSource : public ChromeURLDataManager::DataSource { 96 class CloudyResourceSource : public ChromeURLDataManager::DataSource {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ResourceBundle::GetSharedInstance().GetRawDataResource( 331 ResourceBundle::GetSharedInstance().GetRawDataResource(
332 IDR_ABOUT_SYNC_HTML)); 332 IDR_ABOUT_SYNC_HTML));
333 333
334 return jstemplate_builder::GetTemplateHtml( 334 return jstemplate_builder::GetTemplateHtml(
335 sync_html, &strings , "t" /* template root node id */); 335 sync_html, &strings , "t" /* template root node id */);
336 } 336 }
337 337
338 } // namespace Personalization 338 } // namespace Personalization
339 339
340 #endif // CHROME_PERSONALIZATION 340 #endif // CHROME_PERSONALIZATION
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698