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

Side by Side Diff: athena/activity/activity_manager_impl.cc

Issue 311943003: Fix a typo: RemoveActivity should be called on Remove. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/activity/public/activity_manager.h" 5 #include "athena/activity/public/activity_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "athena/activity/public/activity_view_manager.h" 10 #include "athena/activity/public/activity_view_manager.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 virtual void RemoveActivity(Activity* activity) OVERRIDE { 40 virtual void RemoveActivity(Activity* activity) OVERRIDE {
41 std::vector<Activity*>::iterator find = std::find(activities_.begin(), 41 std::vector<Activity*>::iterator find = std::find(activities_.begin(),
42 activities_.end(), 42 activities_.end(),
43 activity); 43 activity);
44 if (find != activities_.end()) { 44 if (find != activities_.end()) {
45 activities_.erase(find); 45 activities_.erase(find);
46 46
47 ActivityViewManager* manager = ActivityViewManager::Get(); 47 ActivityViewManager* manager = ActivityViewManager::Get();
48 manager->AddActivity(activity); 48 manager->RemoveActivity(activity);
49 } 49 }
50 } 50 }
51 51
52 virtual void UpdateActivity(Activity* activity) OVERRIDE { 52 virtual void UpdateActivity(Activity* activity) OVERRIDE {
53 ActivityViewManager* manager = ActivityViewManager::Get(); 53 ActivityViewManager* manager = ActivityViewManager::Get();
54 manager->UpdateActivity(activity); 54 manager->UpdateActivity(activity);
55 } 55 }
56 56
57 private: 57 private:
58 std::vector<Activity*> activities_; 58 std::vector<Activity*> activities_;
(...skipping 18 matching lines...) Expand all
77 } 77 }
78 78
79 void ActivityManager::Shutdown() { 79 void ActivityManager::Shutdown() {
80 ActivityViewManager::Shutdown(); 80 ActivityViewManager::Shutdown();
81 81
82 CHECK(instance); 82 CHECK(instance);
83 delete instance; 83 delete instance;
84 } 84 }
85 85
86 } // namespace athena 86 } // namespace athena
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