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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 3061009: Speculative fix for crash in DOMUIThumbnailSource. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: msvc++ caught this Created 10 years, 5 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
« no previous file with comments | « chrome/browser/dom_ui/most_visited_handler.cc ('k') | chrome/browser/dom_ui/new_tab_ui.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) 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 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class NewTabHTMLSource : public ChromeURLDataManager::DataSource { 53 class NewTabHTMLSource : public ChromeURLDataManager::DataSource {
54 public: 54 public:
55 explicit NewTabHTMLSource(Profile* profile); 55 explicit NewTabHTMLSource(Profile* profile);
56 56
57 // Called when the network layer has requested a resource underneath 57 // Called when the network layer has requested a resource underneath
58 // the path we registered. 58 // the path we registered.
59 virtual void StartDataRequest(const std::string& path, 59 virtual void StartDataRequest(const std::string& path,
60 bool is_off_the_record, 60 bool is_off_the_record,
61 int request_id); 61 int request_id);
62 62
63 virtual std::string GetMimeType(const std::string&) const { 63 virtual std::string GetMimeType(const std::string&) const;
64 return "text/html";
65 }
66 64
67 // Setters and getters for first_run. 65 // Setters and getters for first_run.
68 static void set_first_run(bool first_run) { first_run_ = first_run; } 66 static void set_first_run(bool first_run) { first_run_ = first_run; }
69 static bool first_run() { return first_run_; } 67 static bool first_run() { return first_run_; }
70 68
71 private: 69 private:
72 ~NewTabHTMLSource() {} 70 virtual ~NewTabHTMLSource();
73 71
74 // Whether this is the first run. 72 // Whether this is the first run.
75 static bool first_run_; 73 static bool first_run_;
76 74
77 // Pointer back to the original profile. 75 // Pointer back to the original profile.
78 Profile* profile_; 76 Profile* profile_;
79 77
80 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); 78 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource);
81 }; 79 };
82 80
(...skipping 13 matching lines...) Expand all
96 94
97 NotificationRegistrar registrar_; 95 NotificationRegistrar registrar_;
98 96
99 // The preference version. This used for migrating prefs of the NTP. 97 // The preference version. This used for migrating prefs of the NTP.
100 static const int current_pref_version_ = 2; 98 static const int current_pref_version_ = 2;
101 99
102 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 100 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
103 }; 101 };
104 102
105 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 103 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/most_visited_handler.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698