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

Side by Side Diff: chrome/browser/sidebar/sidebar_manager.cc

Issue 6122006: Cleanup: Remove unneeded includes of pref_names.h (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 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/sidebar/sidebar_manager.h" 5 #include "chrome/browser/sidebar/sidebar_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/extensions/extension_sidebar_api.h" 11 #include "chrome/browser/extensions/extension_sidebar_api.h"
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/tab_contents/tab_contents.h" 14 #include "chrome/browser/tab_contents/tab_contents.h"
15 #include "chrome/browser/sidebar/sidebar_container.h" 15 #include "chrome/browser/sidebar/sidebar_container.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/notification_service.h" 17 #include "chrome/common/notification_service.h"
18 #include "chrome/common/pref_names.h"
19 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
20 19
21 struct SidebarManager::SidebarStateForTab { 20 struct SidebarManager::SidebarStateForTab {
22 // Sidebars linked to this tab. 21 // Sidebars linked to this tab.
23 ContentIdToSidebarHostMap content_id_to_sidebar_host; 22 ContentIdToSidebarHostMap content_id_to_sidebar_host;
24 // Content id of the currently active (expanded and visible) sidebar. 23 // Content id of the currently active (expanded and visible) sidebar.
25 std::string active_content_id; 24 std::string active_content_id;
26 }; 25 };
27 26
28 // static 27 // static
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 319
321 DCHECK(GetSidebarContainerFor(tab, content_id) == sidebar_host); 320 DCHECK(GetSidebarContainerFor(tab, content_id) == sidebar_host);
322 DCHECK(sidebar_host_to_tab_.find(sidebar_host)->second == tab); 321 DCHECK(sidebar_host_to_tab_.find(sidebar_host)->second == tab);
323 DCHECK(tab_to_sidebar_host_[tab].active_content_id != content_id); 322 DCHECK(tab_to_sidebar_host_[tab].active_content_id != content_id);
324 323
325 tab_to_sidebar_host_[tab].content_id_to_sidebar_host.erase(content_id); 324 tab_to_sidebar_host_[tab].content_id_to_sidebar_host.erase(content_id);
326 if (tab_to_sidebar_host_[tab].content_id_to_sidebar_host.empty()) 325 if (tab_to_sidebar_host_[tab].content_id_to_sidebar_host.empty())
327 tab_to_sidebar_host_.erase(tab); 326 tab_to_sidebar_host_.erase(tab);
328 sidebar_host_to_tab_.erase(sidebar_host); 327 sidebar_host_to_tab_.erase(sidebar_host);
329 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/remoting/remoting_resources_source.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698