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

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

Issue 6905005: [Sync] Fix bug in ExtensionUpdater introduced by r81501 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | « no previous file | chrome/browser/extensions/extension_updater_unittest.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/extensions/extension_updater.h" 5 #include "chrome/browser/extensions/extension_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_)); 911 ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_));
912 } 912 }
913 913
914 void ExtensionUpdater::CheckSoon() { 914 void ExtensionUpdater::CheckSoon() {
915 DCHECK(alive_); 915 DCHECK(alive_);
916 if (will_check_soon_) { 916 if (will_check_soon_) {
917 return; 917 return;
918 } 918 }
919 if (BrowserThread::PostTask( 919 if (BrowserThread::PostTask(
920 BrowserThread::UI, FROM_HERE, 920 BrowserThread::UI, FROM_HERE,
921 method_factory_.NewRunnableMethod(&ExtensionUpdater::CheckNow))) { 921 method_factory_.NewRunnableMethod(
922 &ExtensionUpdater::DoCheckSoon))) {
922 will_check_soon_ = true; 923 will_check_soon_ = true;
923 } else { 924 } else {
924 NOTREACHED(); 925 NOTREACHED();
925 } 926 }
926 } 927 }
927 928
928 bool ExtensionUpdater::WillCheckSoon() const { 929 bool ExtensionUpdater::WillCheckSoon() const {
929 return will_check_soon_; 930 return will_check_soon_;
930 } 931 }
931 932
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 std::set<std::string>::const_iterator i; 1168 std::set<std::string>::const_iterator i;
1168 for (i = ids.begin(); i != ids.end(); ++i) 1169 for (i = ids.begin(); i != ids.end(); ++i)
1169 in_progress_ids_.insert(*i); 1170 in_progress_ids_.insert(*i);
1170 } 1171 }
1171 1172
1172 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) { 1173 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) {
1173 std::set<std::string>::const_iterator i; 1174 std::set<std::string>::const_iterator i;
1174 for (i = ids.begin(); i != ids.end(); ++i) 1175 for (i = ids.begin(); i != ids.end(); ++i)
1175 in_progress_ids_.erase(*i); 1176 in_progress_ids_.erase(*i);
1176 } 1177 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698