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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: call right overloaded method Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/content_settings/content_settings_utils.h" 8 #include "chrome/browser/content_settings/content_settings_utils.h"
9 #include "chrome/browser/content_settings/cookie_settings.h" 9 #include "chrome/browser/content_settings/cookie_settings.h"
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
11 #include "chrome/browser/favicon/favicon_tab_helper.h" 11 #include "chrome/browser/favicon/favicon_tab_helper.h"
12 #include "chrome/browser/infobars/infobar_tab_helper.h" 12 #include "chrome/browser/infobars/infobar_tab_helper.h"
13 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 15 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
16 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate. h" 16 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate. h"
17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" 17 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delega te.h"
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
20 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
21 #include "chrome/common/content_settings.h" 21 #include "chrome/common/content_settings.h"
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "chrome/common/render_messages.h" 23 #include "chrome/common/render_messages.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/browser/render_view_host.h" 25 #include "content/public/browser/render_view_host.h"
26 #include "content/public/browser/user_metrics.h" 26 #include "content/public/browser/user_metrics.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "content/public/browser/web_contents_delegate.h" 28 #include "content/public/browser/web_contents_delegate.h"
(...skipping 21 matching lines...) Expand all
50 if (entries[i].type == type) 50 if (entries[i].type == type)
51 return entries[i].id; 51 return entries[i].id;
52 } 52 }
53 return 0; 53 return 0;
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
58 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { 58 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
59 public: 59 public:
60 ContentSettingTitleAndLinkModel(Browser* browser, 60 ContentSettingTitleAndLinkModel(Delegate* delegate,
61 TabContentsWrapper* tab_contents, 61 TabContentsWrapper* tab_contents,
62 Profile* profile, 62 Profile* profile,
63 ContentSettingsType content_type) 63 ContentSettingsType content_type)
64 : ContentSettingBubbleModel(tab_contents, profile, content_type), 64 : ContentSettingBubbleModel(tab_contents, profile, content_type),
65 browser_(browser) { 65 delegate_(delegate) {
66 // Notifications do not have a bubble. 66 // Notifications do not have a bubble.
67 DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 67 DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
68 SetBlockedResources(); 68 SetBlockedResources();
69 SetTitle(); 69 SetTitle();
70 SetManageLink(); 70 SetManageLink();
71 } 71 }
72 72
73 virtual ~ContentSettingTitleAndLinkModel() {} 73 virtual ~ContentSettingTitleAndLinkModel() {}
74 Browser* browser() const { return browser_; } 74 Delegate* delegate() const { return delegate_; }
75 75
76 private: 76 private:
77 void SetBlockedResources() { 77 void SetBlockedResources() {
78 TabSpecificContentSettings* settings = tab_contents()->content_settings(); 78 TabSpecificContentSettings* settings = tab_contents()->content_settings();
79 const std::set<std::string>& resources = settings->BlockedResourcesForType( 79 const std::set<std::string>& resources = settings->BlockedResourcesForType(
80 content_type()); 80 content_type());
81 for (std::set<std::string>::const_iterator it = resources.begin(); 81 for (std::set<std::string>::const_iterator it = resources.begin();
82 it != resources.end(); ++it) { 82 it != resources.end(); ++it) {
83 AddBlockedResource(*it); 83 AddBlockedResource(*it);
84 } 84 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_LINK}, 124 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_LINK},
125 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LINK}, 125 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LINK},
126 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_LINK}, 126 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_LINK},
127 {CONTENT_SETTINGS_TYPE_GEOLOCATION, IDS_GEOLOCATION_BUBBLE_MANAGE_LINK}, 127 {CONTENT_SETTINGS_TYPE_GEOLOCATION, IDS_GEOLOCATION_BUBBLE_MANAGE_LINK},
128 }; 128 };
129 set_manage_link(l10n_util::GetStringUTF8( 129 set_manage_link(l10n_util::GetStringUTF8(
130 GetIdForContentType(kLinkIDs, arraysize(kLinkIDs), content_type()))); 130 GetIdForContentType(kLinkIDs, arraysize(kLinkIDs), content_type())));
131 } 131 }
132 132
133 virtual void OnManageLinkClicked() { 133 virtual void OnManageLinkClicked() {
134 if (browser_) 134 if (delegate_)
135 browser_->ShowContentSettingsPage(content_type()); 135 delegate_->ShowContentSettingsPage(content_type());
136 } 136 }
137 137
138 Browser* browser_; 138 Delegate* delegate_;
139 }; 139 };
140 140
141 class ContentSettingTitleLinkAndCustomModel 141 class ContentSettingTitleLinkAndCustomModel
142 : public ContentSettingTitleAndLinkModel { 142 : public ContentSettingTitleAndLinkModel {
143 public: 143 public:
144 ContentSettingTitleLinkAndCustomModel(Browser* browser, 144 ContentSettingTitleLinkAndCustomModel(Delegate* delegate,
145 TabContentsWrapper* tab_contents, 145 TabContentsWrapper* tab_contents,
146 Profile* profile, 146 Profile* profile,
147 ContentSettingsType content_type) 147 ContentSettingsType content_type)
148 : ContentSettingTitleAndLinkModel( 148 : ContentSettingTitleAndLinkModel(
149 browser, tab_contents, profile, content_type) { 149 delegate, tab_contents, profile, content_type) {
150 SetCustomLink(); 150 SetCustomLink();
151 } 151 }
152 152
153 virtual ~ContentSettingTitleLinkAndCustomModel() {} 153 virtual ~ContentSettingTitleLinkAndCustomModel() {}
154 154
155 private: 155 private:
156 void SetCustomLink() { 156 void SetCustomLink() {
157 static const ContentSettingsTypeIdEntry kCustomIDs[] = { 157 static const ContentSettingsTypeIdEntry kCustomIDs[] = {
158 {CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_INFO}, 158 {CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_INFO},
159 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LOAD_ALL}, 159 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LOAD_ALL},
160 }; 160 };
161 int custom_link_id = 161 int custom_link_id =
162 GetIdForContentType(kCustomIDs, arraysize(kCustomIDs), content_type()); 162 GetIdForContentType(kCustomIDs, arraysize(kCustomIDs), content_type());
163 if (custom_link_id) 163 if (custom_link_id)
164 set_custom_link(l10n_util::GetStringUTF8(custom_link_id)); 164 set_custom_link(l10n_util::GetStringUTF8(custom_link_id));
165 } 165 }
166 166
167 virtual void OnCustomLinkClicked() {} 167 virtual void OnCustomLinkClicked() {}
168 }; 168 };
169 169
170 170
171 class ContentSettingSingleRadioGroup 171 class ContentSettingSingleRadioGroup
172 : public ContentSettingTitleLinkAndCustomModel { 172 : public ContentSettingTitleLinkAndCustomModel {
173 public: 173 public:
174 ContentSettingSingleRadioGroup(Browser* browser, 174 ContentSettingSingleRadioGroup(Delegate* delegate,
175 TabContentsWrapper* tab_contents, 175 TabContentsWrapper* tab_contents,
176 Profile* profile, 176 Profile* profile,
177 ContentSettingsType content_type) 177 ContentSettingsType content_type)
178 : ContentSettingTitleLinkAndCustomModel(browser, tab_contents, profile, 178 : ContentSettingTitleLinkAndCustomModel(delegate, tab_contents, profile,
179 content_type), 179 content_type),
180 block_setting_(CONTENT_SETTING_BLOCK), 180 block_setting_(CONTENT_SETTING_BLOCK),
181 selected_item_(0) { 181 selected_item_(0) {
182 SetRadioGroup(); 182 SetRadioGroup();
183 } 183 }
184 184
185 virtual ~ContentSettingSingleRadioGroup() { 185 virtual ~ContentSettingSingleRadioGroup() {
186 if (settings_changed()) { 186 if (settings_changed()) {
187 ContentSetting setting = 187 ContentSetting setting =
188 selected_item_ == 0 ? CONTENT_SETTING_ALLOW : block_setting_; 188 selected_item_ == 0 ? CONTENT_SETTING_ALLOW : block_setting_;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 326 }
327 } 327 }
328 328
329 virtual void OnRadioClicked(int radio_index) { 329 virtual void OnRadioClicked(int radio_index) {
330 selected_item_ = radio_index; 330 selected_item_ = radio_index;
331 } 331 }
332 }; 332 };
333 333
334 class ContentSettingCookiesBubbleModel : public ContentSettingSingleRadioGroup { 334 class ContentSettingCookiesBubbleModel : public ContentSettingSingleRadioGroup {
335 public: 335 public:
336 ContentSettingCookiesBubbleModel(Browser* browser, 336 ContentSettingCookiesBubbleModel(Delegate* delegate,
337 TabContentsWrapper* tab_contents, 337 TabContentsWrapper* tab_contents,
338 Profile* profile, 338 Profile* profile,
339 ContentSettingsType content_type) 339 ContentSettingsType content_type)
340 : ContentSettingSingleRadioGroup( 340 : ContentSettingSingleRadioGroup(
341 browser, tab_contents, profile, content_type) { 341 delegate, tab_contents, profile, content_type) {
342 DCHECK_EQ(CONTENT_SETTINGS_TYPE_COOKIES, content_type); 342 DCHECK_EQ(CONTENT_SETTINGS_TYPE_COOKIES, content_type);
343 set_custom_link_enabled(true); 343 set_custom_link_enabled(true);
344 } 344 }
345 345
346 virtual ~ContentSettingCookiesBubbleModel() { 346 virtual ~ContentSettingCookiesBubbleModel() {
347 if (settings_changed()) { 347 if (settings_changed()) {
348 InfoBarTabHelper* infobar_helper = tab_contents()->infobar_tab_helper(); 348 InfoBarTabHelper* infobar_helper = tab_contents()->infobar_tab_helper();
349 infobar_helper->AddInfoBar( 349 infobar_helper->AddInfoBar(
350 new CollectedCookiesInfoBarDelegate(infobar_helper)); 350 new CollectedCookiesInfoBarDelegate(infobar_helper));
351 } 351 }
352 } 352 }
353 353
354 private: 354 private:
355 virtual void OnCustomLinkClicked() OVERRIDE { 355 virtual void OnCustomLinkClicked() OVERRIDE {
356 if (!tab_contents()) 356 if (!tab_contents())
357 return; 357 return;
358 content::NotificationService::current()->Notify( 358 content::NotificationService::current()->Notify(
359 chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, 359 chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
360 content::Source<TabSpecificContentSettings>( 360 content::Source<TabSpecificContentSettings>(
361 tab_contents()->content_settings()), 361 tab_contents()->content_settings()),
362 content::NotificationService::NoDetails()); 362 content::NotificationService::NoDetails());
363 browser()->ShowCollectedCookiesDialog(tab_contents()); 363 delegate()->ShowCollectedCookiesDialog(tab_contents());
364 } 364 }
365 }; 365 };
366 366
367 class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup { 367 class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup {
368 public: 368 public:
369 ContentSettingPluginBubbleModel(Browser* browser, 369 ContentSettingPluginBubbleModel(Delegate* delegate,
370 TabContentsWrapper* tab_contents, 370 TabContentsWrapper* tab_contents,
371 Profile* profile, 371 Profile* profile,
372 ContentSettingsType content_type) 372 ContentSettingsType content_type)
373 : ContentSettingSingleRadioGroup( 373 : ContentSettingSingleRadioGroup(
374 browser, tab_contents, profile, content_type) { 374 delegate, tab_contents, profile, content_type) {
375 DCHECK_EQ(content_type, CONTENT_SETTINGS_TYPE_PLUGINS); 375 DCHECK_EQ(content_type, CONTENT_SETTINGS_TYPE_PLUGINS);
376 set_custom_link_enabled(tab_contents && tab_contents->content_settings()-> 376 set_custom_link_enabled(tab_contents && tab_contents->content_settings()->
377 load_plugins_link_enabled()); 377 load_plugins_link_enabled());
378 } 378 }
379 379
380 virtual ~ContentSettingPluginBubbleModel() {} 380 virtual ~ContentSettingPluginBubbleModel() {}
381 381
382 private: 382 private:
383 virtual void OnCustomLinkClicked() OVERRIDE { 383 virtual void OnCustomLinkClicked() OVERRIDE {
384 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); 384 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble"));
385 DCHECK(tab_contents()); 385 DCHECK(tab_contents());
386 content::RenderViewHost* host = 386 content::RenderViewHost* host =
387 tab_contents()->web_contents()->GetRenderViewHost(); 387 tab_contents()->web_contents()->GetRenderViewHost();
388 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID())); 388 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID()));
389 set_custom_link_enabled(false); 389 set_custom_link_enabled(false);
390 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); 390 tab_contents()->content_settings()->set_load_plugins_link_enabled(false);
391 } 391 }
392 }; 392 };
393 393
394 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { 394 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup {
395 public: 395 public:
396 ContentSettingPopupBubbleModel(Browser* browser, 396 ContentSettingPopupBubbleModel(Delegate* delegate,
397 TabContentsWrapper* tab_contents, 397 TabContentsWrapper* tab_contents,
398 Profile* profile, 398 Profile* profile,
399 ContentSettingsType content_type) 399 ContentSettingsType content_type)
400 : ContentSettingSingleRadioGroup( 400 : ContentSettingSingleRadioGroup(
401 browser, tab_contents, profile, content_type) { 401 delegate, tab_contents, profile, content_type) {
402 SetPopups(); 402 SetPopups();
403 } 403 }
404 404
405 virtual ~ContentSettingPopupBubbleModel() {} 405 virtual ~ContentSettingPopupBubbleModel() {}
406 406
407 private: 407 private:
408 void SetPopups() { 408 void SetPopups() {
409 std::vector<TabContentsWrapper*> blocked_contents; 409 std::vector<TabContentsWrapper*> blocked_contents;
410 tab_contents()->blocked_content_tab_helper()-> 410 tab_contents()->blocked_content_tab_helper()->
411 GetBlockedContents(&blocked_contents); 411 GetBlockedContents(&blocked_contents);
(...skipping 16 matching lines...) Expand all
428 if (tab_contents()) { 428 if (tab_contents()) {
429 tab_contents()->blocked_content_tab_helper()-> 429 tab_contents()->blocked_content_tab_helper()->
430 LaunchForContents(bubble_content().popup_items[index].tab_contents); 430 LaunchForContents(bubble_content().popup_items[index].tab_contents);
431 } 431 }
432 } 432 }
433 }; 433 };
434 434
435 class ContentSettingDomainListBubbleModel 435 class ContentSettingDomainListBubbleModel
436 : public ContentSettingTitleAndLinkModel { 436 : public ContentSettingTitleAndLinkModel {
437 public: 437 public:
438 ContentSettingDomainListBubbleModel(Browser* browser, 438 ContentSettingDomainListBubbleModel(Delegate* delegate,
439 TabContentsWrapper* tab_contents, 439 TabContentsWrapper* tab_contents,
440 Profile* profile, 440 Profile* profile,
441 ContentSettingsType content_type) 441 ContentSettingsType content_type)
442 : ContentSettingTitleAndLinkModel( 442 : ContentSettingTitleAndLinkModel(
443 browser, tab_contents, profile, content_type) { 443 delegate, tab_contents, profile, content_type) {
444 DCHECK_EQ(CONTENT_SETTINGS_TYPE_GEOLOCATION, content_type) << 444 DCHECK_EQ(CONTENT_SETTINGS_TYPE_GEOLOCATION, content_type) <<
445 "SetDomains currently only supports geolocation content type"; 445 "SetDomains currently only supports geolocation content type";
446 SetDomainsAndCustomLink(); 446 SetDomainsAndCustomLink();
447 } 447 }
448 448
449 virtual ~ContentSettingDomainListBubbleModel() {} 449 virtual ~ContentSettingDomainListBubbleModel() {}
450 450
451 private: 451 private:
452 void MaybeAddDomainList(const std::set<std::string>& hosts, int title_id) { 452 void MaybeAddDomainList(const std::set<std::string>& hosts, int title_id) {
453 if (!hosts.empty()) { 453 if (!hosts.empty()) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 CONTENT_SETTINGS_TYPE_GEOLOCATION, 504 CONTENT_SETTINGS_TYPE_GEOLOCATION,
505 std::string(), 505 std::string(),
506 CONTENT_SETTING_DEFAULT); 506 CONTENT_SETTING_DEFAULT);
507 } 507 }
508 } 508 }
509 }; 509 };
510 510
511 // static 511 // static
512 ContentSettingBubbleModel* 512 ContentSettingBubbleModel*
513 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 513 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
514 Browser* browser, 514 Delegate* delegate,
515 TabContentsWrapper* tab_contents, 515 TabContentsWrapper* tab_contents,
516 Profile* profile, 516 Profile* profile,
517 ContentSettingsType content_type) { 517 ContentSettingsType content_type) {
518 if (content_type == CONTENT_SETTINGS_TYPE_COOKIES) { 518 if (content_type == CONTENT_SETTINGS_TYPE_COOKIES) {
519 return new ContentSettingCookiesBubbleModel(browser, tab_contents, profile, 519 return new ContentSettingCookiesBubbleModel(delegate, tab_contents, profile,
520 content_type); 520 content_type);
521 } 521 }
522 if (content_type == CONTENT_SETTINGS_TYPE_POPUPS) { 522 if (content_type == CONTENT_SETTINGS_TYPE_POPUPS) {
523 return new ContentSettingPopupBubbleModel(browser, tab_contents, profile, 523 return new ContentSettingPopupBubbleModel(delegate, tab_contents, profile,
524 content_type); 524 content_type);
525 } 525 }
526 if (content_type == CONTENT_SETTINGS_TYPE_GEOLOCATION) { 526 if (content_type == CONTENT_SETTINGS_TYPE_GEOLOCATION) {
527 return new ContentSettingDomainListBubbleModel(browser, tab_contents, 527 return new ContentSettingDomainListBubbleModel(delegate, tab_contents,
528 profile, content_type); 528 profile, content_type);
529 } 529 }
530 if (content_type == CONTENT_SETTINGS_TYPE_PLUGINS) { 530 if (content_type == CONTENT_SETTINGS_TYPE_PLUGINS) {
531 return new ContentSettingPluginBubbleModel(browser, tab_contents, profile, 531 return new ContentSettingPluginBubbleModel(delegate, tab_contents, profile,
532 content_type); 532 content_type);
533 } 533 }
534 return new ContentSettingSingleRadioGroup(browser, tab_contents, profile, 534 return new ContentSettingSingleRadioGroup(delegate, tab_contents, profile,
535 content_type); 535 content_type);
536 } 536 }
537 537
538 ContentSettingBubbleModel::ContentSettingBubbleModel( 538 ContentSettingBubbleModel::ContentSettingBubbleModel(
539 TabContentsWrapper* tab_contents, 539 TabContentsWrapper* tab_contents,
540 Profile* profile, 540 Profile* profile,
541 ContentSettingsType content_type) 541 ContentSettingsType content_type)
542 : tab_contents_(tab_contents), 542 : tab_contents_(tab_contents),
543 profile_(profile), 543 profile_(profile),
544 content_type_(content_type) { 544 content_type_(content_type) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 tab_contents_ = NULL; 583 tab_contents_ = NULL;
584 break; 584 break;
585 case chrome::NOTIFICATION_PROFILE_DESTROYED: 585 case chrome::NOTIFICATION_PROFILE_DESTROYED:
586 DCHECK(source == content::Source<Profile>(profile_)); 586 DCHECK(source == content::Source<Profile>(profile_));
587 profile_ = NULL; 587 profile_ = NULL;
588 break; 588 break;
589 default: 589 default:
590 NOTREACHED(); 590 NOTREACHED();
591 } 591 }
592 } 592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698