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

Side by Side Diff: chrome/browser/extensions/default_apps.cc

Issue 4411001: Remove component extensions Calendar and Docs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move GMail to external_extensions.json for Chrome OS Created 10 years, 1 month 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extensions/default_apps.h" 5 #include "chrome/browser/extensions/default_apps.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 11
12 const int DefaultApps::kAppsPromoCounterMax = 10; 12 const int DefaultApps::kAppsPromoCounterMax = 10;
13 13
14 // static 14 // static
15 void DefaultApps::RegisterUserPrefs(PrefService* prefs) { 15 void DefaultApps::RegisterUserPrefs(PrefService* prefs) {
16 prefs->RegisterBooleanPref(prefs::kDefaultAppsInstalled, false); 16 prefs->RegisterBooleanPref(prefs::kDefaultAppsInstalled, false);
17 prefs->RegisterIntegerPref(prefs::kAppsPromoCounter, 0); 17 prefs->RegisterIntegerPref(prefs::kAppsPromoCounter, 0);
18 } 18 }
19 19
20 DefaultApps::DefaultApps(PrefService* prefs) 20 DefaultApps::DefaultApps(PrefService* prefs)
21 : prefs_(prefs) { 21 : prefs_(prefs) {
22 #if !defined(OS_CHROMEOS)
22 // gmail, calendar, docs 23 // gmail, calendar, docs
23 ids_.insert("pjkljhegncpnkpknbcohdijeoejaedia"); 24 ids_.insert("pjkljhegncpnkpknbcohdijeoejaedia");
24 ids_.insert("ejjicmeblgpmajnghnpcppodonldlgfn"); 25 ids_.insert("ejjicmeblgpmajnghnpcppodonldlgfn");
25 ids_.insert("apdfllckaahabafndbhieahigkjlhalf"); 26 ids_.insert("apdfllckaahabafndbhieahigkjlhalf");
27 #endif // OS_CHROMEOS
26 } 28 }
27 29
28 DefaultApps::~DefaultApps() {} 30 DefaultApps::~DefaultApps() {}
29 31
30 const ExtensionIdSet* DefaultApps::GetAppsToInstall() const { 32 const ExtensionIdSet* DefaultApps::GetAppsToInstall() const {
31 if (GetDefaultAppsInstalled()) 33 if (GetDefaultAppsInstalled())
32 return NULL; 34 return NULL;
33 else 35 else
34 return &ids_; 36 return &ids_;
35 } 37 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 104 }
103 105
104 bool DefaultApps::GetDefaultAppsInstalled() const { 106 bool DefaultApps::GetDefaultAppsInstalled() const {
105 return prefs_->GetBoolean(prefs::kDefaultAppsInstalled); 107 return prefs_->GetBoolean(prefs::kDefaultAppsInstalled);
106 } 108 }
107 109
108 void DefaultApps::SetDefaultAppsInstalled(bool val) { 110 void DefaultApps::SetDefaultAppsInstalled(bool val) {
109 prefs_->SetBoolean(prefs::kDefaultAppsInstalled, val); 111 prefs_->SetBoolean(prefs::kDefaultAppsInstalled, val);
110 prefs_->ScheduleSavePersistentPrefs(); 112 prefs_->ScheduleSavePersistentPrefs();
111 } 113 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698